Hi David,
What bundle of jetty are you referring to?
here is a list of jetty related bundle found under may karaf
[ 76] [Active ] [ ] [ ] [ 60] Jetty ::
Utilities (7.2.2.v20101205)
[ 77] [Active ] [ ] [ ] [ 60] Jetty :: IO
Utility (7.2.2.v20101205)
[ 78] [Active ] [ ] [ ] [ 60] Jetty :: Http
Utility (7.2.2.v20101205)
[ 79] [Active ] [ ] [ ] [ 60] Jetty ::
Continuation (7.2.2.v20101205)
[ 80] [Active ] [ ] [ ] [ 60] Jetty :: Server
Core (7.2.2.v20101205)
[ 81] [Active ] [ ] [ ] [ 60] Jetty ::
Security (7.2.2.v20101205)
[ 82] [Active ] [ ] [ ] [ 60] Jetty :: Servlet
Handling (7.2.2.v20101205)
[ 83] [Active ] [ ] [ ] [ 60] Jetty :: XML
utilities (7.2.2.v20101205)
[ 87] [Active ] [ ] [ ] [ 60] OPS4J Pax Web -
Jetty (1.0.1)
About copying *.tld files, I already made the attempt, but still see
the same issue. I even add tld file to my bundle-classpath (
<Bundle-ClassPath>.,WEB-INF/classes,
WEB-INF/classes/META-INF/myfaces_core.tld,WEB-INF/classes/META-INF/myfaces_html.tld,{maven-dependencies}</Bundle-ClassPath>
)
also notice karaf expands my embeded war to bundle.jar and
bundle.jar-embedded, both are under data/cache/bundleXYZ/version0.0.
undle.jar-embedded is a directory which has WEB-INF/classses and
WEB-INF/lib. but WEB-INF/classes are empty I would expect it has the
copied tld files
To be very verbose, here is the content
C:\Users\dan.tran\dev\karaf\apache-karaf-2.2.0\data\cache\bundle94>dir /s
Volume in drive C is OS
Volume Serial Number is 0CD0-A3E1
Directory of C:\Users\dan.tran\dev\karaf\apache-karaf-2.2.0\data\cache\bundle94
03/06/2011 01:30 PM <DIR> .
03/06/2011 01:30 PM <DIR> ..
03/06/2011 01:30 PM 2 bundle.id
03/06/2011 01:30 PM 13 bundle.lastmodified
03/06/2011 01:30 PM 66 bundle.location
03/06/2011 01:30 PM 2 bundle.startlevel
03/06/2011 01:30 PM 8 bundle.state
03/06/2011 01:30 PM <DIR> version0.0
5 File(s) 91 bytes
Directory of
C:\Users\dan.tran\dev\karaf\apache-karaf-2.2.0\data\cache\bundle94\version0.0
03/06/2011 01:30 PM <DIR> .
03/06/2011 01:30 PM <DIR> ..
03/06/2011 01:30 PM 28,428,064 bundle.jar
03/06/2011 01:30 PM <DIR> bundle.jar-embedded
03/06/2011 01:30 PM 12 revision.location
2 File(s) 28,428,076 bytes
Directory of
C:\Users\dan.tran\dev\karaf\apache-karaf-2.2.0\data\cache\bundle94\version0.0\bundle.jar-embedded
03/06/2011 01:30 PM <DIR> .
03/06/2011 01:30 PM <DIR> ..
03/06/2011 01:30 PM <DIR> WEB-INF
0 File(s) 0 bytes
Directory of
C:\Users\dan.tran\dev\karaf\apache-karaf-2.2.0\data\cache\bundle94\version0.0\bundle.jar-embedded\WEB-INF
03/06/2011 01:30 PM <DIR> .
03/06/2011 01:30 PM <DIR> ..
03/06/2011 01:30 PM <DIR> classes
03/06/2011 01:30 PM <DIR> lib
0 File(s) 0 bytes
Directory of
C:\Users\dan.tran\dev\karaf\apache-karaf-2.2.0\data\cache\bundle94\version0.0\bundle.jar-embedded\WEB-INF\classes
03/06/2011 01:30 PM <DIR> .
03/06/2011 01:30 PM <DIR> ..
0 File(s) 0 bytes
Directory of
C:\Users\dan.tran\dev\karaf\apache-karaf-2.2.0\data\cache\bundle94\version0.0\bundle.jar-embedded\WEB-INF\lib
03/06/2011 01:30 PM <DIR> .
03/06/2011 01:30 PM <DIR> ..
03/06/2011 01:30 PM 443,432 antlr-2.7.6.jar
03/06/2011 01:30 PM 4,467 aopalliance-1.0.jar
03/06/2011 01:30 PM 43,033 asm-3.1.jar
03/06/2011 01:30 PM 114,980 aspectjrt-1.5.4.jar
03/06/2011 01:30 PM 8,252,251 aspectjtools-1.5.4.jar
03/06/2011 01:30 PM 29,201 bluesky-1.0.0.jar
03/06/2011 01:30 PM 278,682 cglib-2.2.jar
03/06/2011 01:30 PM 322,362 cglib-nodep-2.2.jar
03/06/2011 01:30 PM 232,019 commons-beanutils-1.8.3.jar
03/06/2011 01:30 PM 58,160 commons-codec-1.4.jar
03/06/2011 01:30 PM 571,259 commons-collections-3.2.jar
03/06/2011 01:30 PM 160,519 commons-dbcp-1.4.jar
03/06/2011 01:30 PM 196,768 commons-digester-2.1.jar
03/06/2011 01:30 PM 59,590 commons-fileupload-1.2.2.jar
03/06/2011 01:30 PM 109,043 commons-io-1.4.jar
03/06/2011 01:30 PM 279,193 commons-lang-2.5.jar
03/06/2011 01:30 PM 60,686 commons-logging-1.1.1.jar
03/06/2011 01:30 PM 96,221 commons-pool-1.5.4.jar
03/06/2011 01:30 PM 2,628,039 derby-10.6.2.1.jar
03/06/2011 01:30 PM 313,898 dom4j-1.6.1.jar
03/06/2011 01:30 PM 1,217,057 h2-1.2.147.jar
03/06/2011 01:30 PM 71,283
hibernate-commons-annotations-3.2.0.Final.jar
03/06/2011 01:30 PM 3,108,236 hibernate-core-3.6.1.Final.jar
03/06/2011 01:30 PM 417,785 hibernate-entitymanager-3.6.1.Final.jar
03/06/2011 01:30 PM 100,884 hibernate-jpa-2.0-api-1.0.0.Final.jar
03/06/2011 01:30 PM 633,312 javassist-3.12.0.GA.jar
03/06/2011 01:30 PM 17,308 jcl-over-slf4j-1.6.1.jar
03/06/2011 01:30 PM 309,293 jcommon-1.0.16.jar
03/06/2011 01:30 PM 1,425,742 jfreechart-1.0.13.jar
03/06/2011 01:30 PM 30,700 jstl-api-1.2.jar
03/06/2011 01:30 PM 392,456 jstl-impl-1.2.jar
03/06/2011 01:30 PM 15,071 jta-1.1.jar
03/06/2011 01:30 PM 367,444 log4j-1.2.14.jar
03/06/2011 01:30 PM 24,073 mc-common-1.0.0.CI-SNAPSHOT.jar
03/06/2011 01:30 PM 4,645 mc-config-1.0.0.CI-SNAPSHOT.jar
03/06/2011 01:30 PM 8,635 mc-dbsetup-1.0.0.CI-SNAPSHOT.jar
03/06/2011 01:30 PM 12,646 mc-mgmt-1.0.0.CI-SNAPSHOT.jar
03/06/2011 01:30 PM 6,095 mc-theme-1.0.0.CI-SNAPSHOT.jar
03/06/2011 01:30 PM 8,244 mc-user-1.0.0.CI-SNAPSHOT.jar
03/06/2011 01:30 PM 905,071 myfaces-api-2.0.4.jar
03/06/2011 01:30 PM 1,715,544 myfaces-impl-2.0.4.jar
03/06/2011 01:30 PM 223,171 plexus-utils-2.0.5.jar
03/06/2011 01:30 PM 1,718,901 primefaces-2.2.1.jar
03/06/2011 01:30 PM 318,523 shiro-core-1.1.0.jar
03/06/2011 01:30 PM 24,763 shiro-spring-1.1.0.jar
03/06/2011 01:30 PM 122,020 shiro-web-1.1.0.jar
03/06/2011 01:30 PM 25,496 slf4j-api-1.6.1.jar
03/06/2011 01:30 PM 9,753 slf4j-log4j12-1.6.1.jar
03/06/2011 01:30 PM 321,190 spring-aop-3.0.5.RELEASE.jar
03/06/2011 01:30 PM 53,082 spring-asm-3.0.5.RELEASE.jar
03/06/2011 01:30 PM 555,410 spring-beans-3.0.5.RELEASE.jar
03/06/2011 01:30 PM 668,861 spring-context-3.0.5.RELEASE.jar
03/06/2011 01:30 PM 382,442 spring-core-3.0.5.RELEASE.jar
03/06/2011 01:30 PM 169,752 spring-expression-3.0.5.RELEASE.jar
03/06/2011 01:30 PM 385,712 spring-jdbc-3.0.5.RELEASE.jar
03/06/2011 01:30 PM 334,327 spring-orm-3.0.5.RELEASE.jar
03/06/2011 01:30 PM 231,922 spring-tx-3.0.5.RELEASE.jar
03/06/2011 01:30 PM 395,587 spring-web-3.0.5.RELEASE.jar
58 File(s) 30,986,239 bytes
Total Files Listed:
65 File(s) 59,414,406 bytes
17 Dir(s) 150,173,736,960 bytes free
Thanks for all the help
-Dan
On Sun, Mar 6, 2011 at 12:56 PM, David Jencks <[email protected]> wrote:
> That won't help with the jars embedded in the war bundle, they are already in
> the same classloader.
>
> I think the problem is likely to be that jetty/jasper/* doesn't know how to
> scan bundles-with Bundle-Classpath for resources. If you want to try to
> convince jetty to do this I'd recommend using xbean-finder.
>
> A more likely solution might be to copy the tld files into
> WEB-INF/classes/META-INF and hope that jetty/jasper/myfaces finds them there.
>
> thanks
> david jencks
>
> On Mar 6, 2011, at 12:40 PM, Achim Nierbeck wrote:
>
>> Hi Dan,
>>
>> one workaround for the tlds in another bundle (not your own war bundle)
>> is to add a
>> require bundle in the manifest entry of your war-bundle to the one
>> providing the tlds.
>> This way your "merge" the classloader of those two bundles and the tlds
>> provided by the
>> "external" bundle are seen as tlds of the war bundle. (hope I made that
>> clear :) )
>>
>> Greetings, Achim
>>
>>> hi Achim
>>>
>>> Ouch, I have a long way to go.
>>>
>>> do you know the exact place of code to get tld scanning working for
>>> embedded war file?
>>>
>>> Or is it better to make JSF feature to be consumed by JSF app? not
>>> sure if this would work without tld scanning working
>>>
>>>
>>> Thanks
>>>
>>> -Dan
>>>
>>> On Sat, Mar 5, 2011 at 11:49 AM, Achim Nierbeck <[email protected]>
>>> wrote:
>>>> Hi Dan,
>>>>
>>>> There is only tld scanning for tlds in the corresponding bundle/war, but no
>>>> tld scanning in bundles which are imported
>>>> http://issues.ops4j.org/browse/PAXWEB-86
>>>>
>>>> So there is some sort of scanning for tlds.
>>>>
>>>> But for JSF there is also http://issues.ops4j.org/browse/PAXWEB-255
>>>> where the values of a form aren't working.
>>>>
>>>> Greetings, Achim
>>>>
>>>>
>>>> Hi Achim,
>>>>
>>>> According this post
>>>> http://karaf.922171.n3.nabble.com/Apache-Karaf-amp-WAR-JSF-td2465980.html#a2472594,
>>>> you posted a small example JSF 1.x example war file working wth Karaf.
>>>>
>>>> In that war file, you see myfaces-impl's tld files get copy to war's
>>>> WEB-INF/classes/META-INFO, and then you add the copied tld classpath
>>>> to MANIFEST's bundle-classpath
>>>>
>>>> isn't it some type of tld scanning ?
>>>>
>>>> At this moment, i am going down that route with hope to get my
>>>> standalone JSF war working 'further'. Still struggling to get my
>>>> MAFIFEST file generated.
>>>>
>>>> Thanks
>>>>
>>>> -D
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On Sat, Mar 5, 2011 at 9:13 AM, Achim Nierbeck <[email protected]>
>>>> wrote:
>>>>
>>>> Hi,
>>>>
>>>> no pax-web does no pecific tld scanning, if some enhancements are needed
>>>> please file a issue there :)
>>>> Regarding the jasper part, that is included inside the pax-web-jsp bundle.
>>>> This one does export it.
>>>>
>>>> Regards, Achim
>>>>
>>>> I'd guess that neither jetty-7 nor pax web implement tld scanning so it
>>>> works in osgi, but I certainly haven't looked into it. tld scanning has
>>>> certainly caused problems in pre-osgi geronimo in the past.
>>>>
>>>> BTW where does jsp support come from? I don't see any jasper bundles
>>>> listed anywhere in the features.xml.... maybe I missed something.
>>>>
>>>> thanks
>>>> david jencks
>>>>
>>>> On Mar 4, 2011, at 9:30 PM, Dan Tran wrote:
>>>>
>>>> sorry about the noise, but I found another fact here:
>>>>
>>>> StartupServletContextListener is defined under
>>>> myface-impl-xxx.jar/META-INF/myfaces-core.tld and jsf tags are under
>>>> some other tld files under same location.
>>>>
>>>> This means karaf web container does not automatically load tld files
>>>> under JSF implementation META-INF resources( both myfaces and mojarra
>>>> see the same thing here ). This explains why
>>>> the initial listener is loaded which causes FacesServlet init
>>>> failures and JSF tag loading issues
>>>>
>>>> What should I do next to get Karaf to fix this issue?
>>>>
>>>> Thanks
>>>>
>>>>
>>>>
>>>> On Fri, Mar 4, 2011 at 9:17 PM, Dan Tran<[email protected]> wrote:
>>>>
>>>> I found the same exact issue with a simple myface 2.0.x example war
>>>> file
>>>> http://repo2.maven.org/maven2/org/apache/myfaces/commons/myfaces-commons-examples20/1.0.1/myfaces-commons-examples20-1.0.1.war
>>>>
>>>> The error spits out from myface seems to give some hint
>>>>
>>>> 21:06:14,178 | WARN | raf-2.2.0/deploy | /mfe
>>>> | .eclipse.jetty.util.log.Slf4jLog 50 | 193 -
>>>> org.eclipse.jetty.util - 7.2.2.v20101205 | unavailable
>>>> java.lang.IllegalStateException: No Factories configured for this
>>>> Application. This happens if the faces-initialization does not work at
>>>> all - make sure that you properly include all configuration settings
>>>> necessary for a basic faces application and that all the necessary
>>>> libs are included. Also che
>>>> ck the logging output of your web application and your container for
>>>> any exceptions!
>>>> If you did that and find nothing, the mistake might be due to the fact
>>>> that you use some special web-containers which do not support
>>>> registering context-listeners via TLD files and a context listener is
>>>> not setup in your web.xml.
>>>> A typical config looks like this;
>>>> <listener>
>>>>
>>>> <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
>>>> </listener>
>>>>
>>>> at
>>>> javax.faces.FactoryFinder.getFactory(FactoryFinder.java:172)[243:mfe:0.0.0]
>>>> at
>>>> javax.faces.webapp.FacesServlet.init(FacesServlet.java:112)[243:mfe:0.0.0]
>>>>
>>>>
>>>>
>>>> Even if I add the listener to my web.xml, then I ran into jsf tag
>>>> loading problem.
>>>>
>>>> I also attempt the debug the issue with both myfaces and mojarra, both
>>>> indicate a bunch of jsf factories are not inititialized and there for
>>>> javax.faces.webapp.FacesServlet bails out
>>>>
>>>> Look like this is karaf/felix class loader problem
>>>>
>>>> -D
>>>>
>>>>
>>>>
>>>>
>>
>
>