I'm trying to learn Seam and JSF. I downloaded jboss with the seam examples, but I can't get them to work in my app server (jetty). When I run ant in any of the example projects (e.g. jboss-seam-2.0.3.CR1\examp
les\dvdsto
re or jboss-seam-2.0.3.CR1\examp
les\icefac
es) it creates files in the dist directories.
I take the war files that are generated, I unzip them, copy all the jars from jboss-seam-2.0.3.CR1\lib into the WEB-INF\lib of the example, then I move the result over to the webapps directory of jetty.
After starting jetty it gives me these errors:
org.mortbay.util.MultiExce
ption[java
.lang.Runt
imeExcepti
on: Could not create Component: orderHome, java.lang.IllegalStateExce
ption: Application was not properly initialized at startup, could not find Factory: javax.faces.context.FacesC
ontextFact
ory]
at org.mortbay.http.HttpServe
r.doStart(
HttpServer
.java:686)
at org.mortbay.jetty.plus.Ser
ver.doStar
t(Server.j
ava:153)
at org.mortbay.util.Container
.start(Con
tainer.jav
a:72)
at org.mortbay.jetty.plus.Ser
ver.main(S
erver.java
:202)
at sun.reflect.NativeMethodAc
cessorImpl
.invoke0(N
ative Method)
at sun.reflect.NativeMethodAc
cessorImpl
.invoke(Na
tiveMethod
AccessorIm
pl.java:39
)
at sun.reflect.DelegatingMeth
odAccessor
Impl.invok
e(Delegati
ngMethodAc
cessorImpl
.java:25)
at java.lang.reflect.Method.i
nvoke(Meth
od.java:59
7)
at org.mortbay.start.Main.inv
okeMain(Ma
in.java:15
1)
at org.mortbay.start.Main.sta
rt(Main.ja
va:476)
at org.mortbay.start.Main.mai
n(Main.jav
a:94)
java.lang.RuntimeException
: Could not create Component: orderHome
at org.jboss.seam.init.Initia
lization.a
ddComponen
t(Initiali
zation.jav
a:989)
at org.jboss.seam.init.Initia
lization.i
nstallComp
onents(Ini
tializatio
n.java:911
)
at org.jboss.seam.init.Initia
lization.i
nit(Initia
lization.j
ava:589)
at org.jboss.seam.servlet.Sea
mListener.
contextIni
tialized(S
eamListene
r.java:34)
at org.mortbay.jetty.servlet.
WebApplica
tionContex
t.doStart(
WebApplica
tionContex
t.java:495
)
at org.mortbay.jetty.plus.Plu
sWebAppCon
text.doSta
rt(PlusWeb
AppContext
.java:149)
at org.mortbay.util.Container
.start(Con
tainer.jav
a:72)
at org.mortbay.http.HttpServe
r.doStart(
HttpServer
.java:708)
at org.mortbay.jetty.plus.Ser
ver.doStar
t(Server.j
ava:153)
at org.mortbay.util.Container
.start(Con
tainer.jav
a:72)
at org.mortbay.jetty.plus.Ser
ver.main(S
erver.java
:202)
at sun.reflect.NativeMethodAc
cessorImpl
.invoke0(N
ative Method)
at sun.reflect.NativeMethodAc
cessorImpl
.invoke(Na
tiveMethod
AccessorIm
pl.java:39
)
at sun.reflect.DelegatingMeth
odAccessor
Impl.invok
e(Delegati
ngMethodAc
cessorImpl
.java:25)
at java.lang.reflect.Method.i
nvoke(Meth
od.java:59
7)
at org.mortbay.start.Main.inv
okeMain(Ma
in.java:15
1)
at org.mortbay.start.Main.sta
rt(Main.ja
va:476)
at org.mortbay.start.Main.mai
n(Main.jav
a:94)
Caused by: java.lang.IllegalArgumentE
xception: java.lang.ClassNotFoundExc
eption: com.jboss.dvd.seam.Order
at org.jboss.seam.util.Conver
sions$Clas
sConverter
.toObject(
Conversion
s.java:265
)
at org.jboss.seam.util.Conver
sions$Clas
sConverter
.toObject(
Conversion
s.java:255
)
at org.jboss.seam.Component$C
onstantIni
tialValue.
<init>(Com
ponent.jav
a:2320)
at org.jboss.seam.Component.g
etInitialV
alue(Compo
nent.java:
518)
at org.jboss.seam.Component.g
etTopIniti
alValue(Co
mponent.ja
va:498)
at org.jboss.seam.Component.i
nitInitial
izers(Comp
onent.java
:476)
at org.jboss.seam.Component.<
init>(Comp
onent.java
:264)
at org.jboss.seam.Component.<
init>(Comp
onent.java
:217)
at org.jboss.seam.init.Initia
lization.a
ddComponen
t(Initiali
zation.jav
a:974)
... 17 more
Caused by: java.lang.ClassNotFoundExc
eption: com.jboss.dvd.seam.Order
at java.net.URLClassLoader$1.
run(URLCla
ssLoader.j
ava:200)
at java.security.AccessContro
ller.doPri
vileged(Na
tive Method)
at java.net.URLClassLoader.fi
ndClass(UR
LClassLoad
er.java:18
8)
at org.mortbay.http.ContextLo
ader.loadC
lass(Conte
xtLoader.j
ava:219)
at org.mortbay.http.ContextLo
ader.loadC
lass(Conte
xtLoader.j
ava:187)
at java.lang.ClassLoader.load
ClassInter
nal(ClassL
oader.java
:319)
at java.lang.Class.forName0(N
ative Method)
at java.lang.Class.forName(Cl
ass.java:1
69)
at org.jboss.seam.util.Reflec
tions.clas
sForName(R
eflections
.java:165)
at org.jboss.seam.util.Conver
sions$Clas
sConverter
.toObject(
Conversion
s.java:261
)
... 25 more
java.lang.IllegalStateExce
ption: Application was not properly initialized at startup, could not find Factory: javax.faces.context.FacesC
ontextFact
ory
at javax.faces.FactoryFinder.
getFactory
(FactoryFi
nder.java:
256)
at javax.faces.webapp.FacesSe
rvlet.init
(FacesServ
let.java:1
42)
at org.mortbay.jetty.servlet.
ServletHol
der.initSe
rvlet(Serv
letHolder.
java:383)
at org.mortbay.jetty.servlet.
ServletHol
der.start(
ServletHol
der.java:2
43)
at org.mortbay.jetty.servlet.
ServletHan
dler.initi
alizeServl
ets(Servle
tHandler.j
ava:446)
at org.mortbay.jetty.servlet.
WebApplica
tionHandle
r.initiali
zeServlets
(WebApplic
ationHandl
er.java:32
1)
at org.mortbay.jetty.servlet.
WebApplica
tionContex
t.doStart(
WebApplica
tionContex
t.java:509
)
at org.mortbay.jetty.plus.Plu
sWebAppCon
text.doSta
rt(PlusWeb
AppContext
.java:149)
at org.mortbay.util.Container
.start(Con
tainer.jav
a:72)
at org.mortbay.http.HttpServe
r.doStart(
HttpServer
.java:708)
at org.mortbay.jetty.plus.Ser
ver.doStar
t(Server.j
ava:153)
at org.mortbay.util.Container
.start(Con
tainer.jav
a:72)
at org.mortbay.jetty.plus.Ser
ver.main(S
erver.java
:202)
at sun.reflect.NativeMethodAc
cessorImpl
.invoke0(N
ative Method)
at sun.reflect.NativeMethodAc
cessorImpl
.invoke(Na
tiveMethod
AccessorIm
pl.java:39
)
at sun.reflect.DelegatingMeth
odAccessor
Impl.invok
e(Delegati
ngMethodAc
cessorImpl
.java:25)
at java.lang.reflect.Method.i
nvoke(Meth
od.java:59
7)
at org.mortbay.start.Main.inv
okeMain(Ma
in.java:15
1)
at org.mortbay.start.Main.sta
rt(Main.ja
va:476)
at org.mortbay.start.Main.mai
n(Main.jav
a:94)
I've found a bunch of references to these errors on various sites, but none of them provided a solution I could use.
I have been thinking of trying glassfish, so I downloaded it and tried to deploy the ear file that is generated. When I do that it gives the error "Deploying application in domain failed; Fatal Error from EJB Compiler -- javassist/util/proxy/Metho
dHandler Fatal Error from EJB Compiler -- javassist/util/proxy/Metho
dHandler",
so it apparently doesn't work out of the box for glassfish either.
Anyone know what I can do? It sort of sounded like the FacesContextFactory error has something to do with jsf 1.2 vs jsf 1.1, but I can't tell for sure if that is true. Even if it is, it doesn't make sense. I'm using the jsf jars that came with the jboss examples, so they should work.
Start Free Trial