[SEAM] seam的例子“hibernate”无法在tomcat下运行?
super_094
2008-12-17
按照例子里的说明,用ant tomcat6编译了工程,生成了jboss-seam-hibernate.war,我把这个WAR拷贝到tomcat6的webapps目录下,却无法正常运行。请问大家有没有碰到这样的问题呀?
控制台的信息: 信息: Initializing Mojarra (1.2_09-b01-BETA1) for context '/jboss-seam-hibernate' 2008-12-17 9:08:46 org.jboss.seam.servlet.SeamListener contextInitialized 信息: Welcome to Seam 2.1.0.BETA1 2008-12-17 9:08:47 org.apache.catalina.core.StandardContext start 严重: Error listenerStart 2008-12-17 9:08:47 org.apache.catalina.core.StandardContext start 严重: Context [/jboss-seam-hibernate] startup failed due to previous errors log里的错误信息是: 2008-12-17 9:05:56 org.apache.catalina.core.StandardContext listenerStart 严重: Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener java.lang.IllegalStateException: Cannot load WEB-INF/classes/org/jboss/seam/example/hibernate/AuthenticatorAction.class from WebappClassLoader delegate: false repositories: /WEB-INF/classes/ ----------> Parent Classloader: org.apache.catalina.loader.StandardClassLoader@1a05308 (using getResourceAsStream() returned null) at org.jboss.seam.deployment.AbstractDeploymentHandler.getClassFile(AbstractDeploymentHandler.java:41) at org.jboss.seam.deployment.ComponentDeploymentHandler.handle(ComponentDeploymentHandler.java:57) at org.jboss.seam.deployment.DeploymentStrategy.handle(DeploymentStrategy.java:177) at org.jboss.seam.deployment.AbstractScanner.handleItem(AbstractScanner.java:30) at org.jboss.seam.deployment.URLScanner.handleDirectory(URLScanner.java:141) at org.jboss.seam.deployment.URLScanner.handleDirectory(URLScanner.java:137) at org.jboss.seam.deployment.URLScanner.handleDirectory(URLScanner.java:137) at org.jboss.seam.deployment.URLScanner.handleDirectory(URLScanner.java:137) at org.jboss.seam.deployment.URLScanner.handleDirectory(URLScanner.java:137) at org.jboss.seam.deployment.URLScanner.handleDirectory(URLScanner.java:137) at org.jboss.seam.deployment.URLScanner.handleDirectory(URLScanner.java:137) at org.jboss.seam.deployment.URLScanner.handleDirectory(URLScanner.java:137) at org.jboss.seam.deployment.URLScanner.scanDirectories(URLScanner.java:40) at org.jboss.seam.deployment.StandardDeploymentStrategy.scan(StandardDeploymentStrategy.java:107) at org.jboss.seam.init.Initialization.create(Initialization.java:113) at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:34) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:627) at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) at org.apache.catalina.core.StandardHost.start(StandardHost.java:719) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:516) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:578) 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.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) |
|
dmewy
2008-12-17
Cannot load WEB-INF/classes/org/jboss/seam/example/hibernate/AuthenticatorAction.class from WebappClassLoader ..
意思就是说这个war包里面需要依赖Jboss的系统lib.. tomcat里面没有这个jar. 你可以包在war里面或者放在tomcat的system lib下.. |
|
super_094
2008-12-17
dmewy 写道 Cannot load WEB-INF/classes/org/jboss/seam/example/hibernate/AuthenticatorAction.class from WebappClassLoader ..
意思就是说这个war包里面需要依赖Jboss的系统lib.. tomcat里面没有这个jar. 你可以包在war里面或者放在tomcat的system lib下.. 这里只是说找不到org/jboss/seam/example/hibernate/AuthenticatorAction.class这个类吧? |
|
super_094
2008-12-18
解决了,下载seam的最新版就可以了,之前我用的是beta版
|