-
15. Re: problem in a simple seam application
monkeyden Oct 17, 2006 10:36 AM (in response to mnrz)You can put it in one or the other, but probably not both (never tried it).
org.jboss.seam.core.init.jndiPattern=#{ejbName}/local
...would go in seam.properties
OR your XML would go in components.xml -
16. Re: problem in a simple seam application
mnrz Oct 18, 2006 1:06 AM (in response to mnrz)"monkeyden" wrote:
You can put it in one or the other, but probably not both (never tried it).
of course, I don't. -
17. Re: problem in a simple seam application
mnrz Oct 18, 2006 7:18 AM (in response to mnrz)Hi Gavin,
here is my application structure for more information, maybe I made somewhere wrong :registration META-INF/ manifest.mf pages/ index.html register.jsp registered.jsp WEB-INF/ components.xml faces-config.xml web.xml lib/ mc-conf.jar registration.jar/ seam.properties com/test/..... META-INF/ application.xml ejb-jar.xml jboss-app.xml jboss-beans.xml persistence.xml
Thanks -
18. Re: problem in a simple seam application
gavin.king Oct 18, 2006 9:33 AM (in response to mnrz)Why don't you simply start again from the start. Begin with the registration example (which works), and make changes one at a time.
-
19. Re: problem in a simple seam application
mnrz Oct 19, 2006 4:13 AM (in response to mnrz)"Gavin" wrote:
Why don't you simply start again from the start. Begin with the registration example (which works), and make changes one at a time.
because I detest copy/paste programming. I want to understand every details of the Seam.
I take a exact look at the original registration in example folder and mine, and that is incredible!, everything is the same and no difference, but mine throws this weird exception.
I have a quesion: Is the name of application or jar files has something to do with installing Embedded Ejb or installing whole application? because I change the jar file from jboss-seam-registration.jar to registration-web.jar. is this important to the Seam? -
20. Re: problem in a simple seam application
mnrz Oct 19, 2006 5:15 AM (in response to mnrz)
I think something wrong with database connection and these exception just misleading us. In my opinion "@In User user" causes this RegisterAction not being instanciated properly.
here is jboss-beans.xml<?xml version="1.0" encoding="UTF-8"?> <deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:jboss:bean-deployer bean-deployer_1_0.xsd" xmlns="urn:jboss:bean-deployer"> <bean name="testDatasourceBootstrap" class="org.jboss.resource.adapter.jdbc.local.LocalTxDataSource"> <property name="driverClass">com.mysql.jdbc.Driver</property> <property name="connectionURL"> jdbc:mysql://192.168.0.157:3306/seamtest?autoReconnect=true&useUnicode=true&characterEncoding=UTF8 </property> <property name="userName">root</property> <property name="password">root</property> <property name="jndiName">jdbc:/testDatasource</property> <property name="minSize">0</property> <property name="maxSize">10</property> <property name="blockingTimeout">1000</property> <property name="idleTimeout">100000</property> <property name="transactionManager"> <inject bean="TransactionManager" /> </property> <property name="cachedConnectionManager"> <inject bean="CachedConnectionManager" /> </property> <property name="initialContextProperties"> <inject bean="InitialContextProperties" /> </property> </bean> <bean name="testDatasource" class="java.lang.Object"> <constructor factoryMethod="getDatasource"> <factory bean="testDatasourceBootstrap" /> </constructor> </bean> </deployment>
I have doubt about those red codes!!!
and persistence.xml<persistence> <persistence-unit name="testDatabase"> <provider>org.hibernate.ejb.HibernatePersistence</provider> <jta-data-source>jdbc:/testDatasource</jta-data-source> <properties> <property name="hibernate.hbm2ddl.auto" value="create-drop" /> <property name="hibernate.show_sql" value="true" /> <!-- These are the default for JBoss EJB3, but not for HEM: --> <property name="hibernate.cache.provider_class" value="org.hibernate.cache.HashtableCacheProvider" /> <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup" /> <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect" /> </properties> </persistence-unit> </persistence>
-
21. Re: problem in a simple seam application
cja987 Oct 19, 2006 4:17 PM (in response to mnrz)The "war" target in seam's build.xml used by the examples does some filterset tweaking for the jndiPattern and to turn the embedded ejb off, and so on. So while your sources are the same, if you use a different build process then you won't get the same results. Just tweak your components.properties as indicated, or just wire it into your components.xml (though the latter this makes testing trickier)
-
22. Re: problem in a simple seam application
dilshat Oct 20, 2006 2:34 AM (in response to mnrz)I am still having the same problem with the simple registration example although I have followed the exact procedure on the readme.txt.
In order to see whether the Bean is actually created on the registration page, I have slightly modified the getName() method:..... @Name("user") @Scope(SESSION) .... public class User implements Serializable { .... public String getName() { return "I am created:"+name; }
I am expecting on the first page should display the "I am created:" as the value of:<h:inputText value="#{user.username}" required="true"/>
on the registration page. But it still displays the empty content, and when I press "Registration" button, it display three "Conversion Error" message.
Running out of option, I have created the bean using managed bean in the faces-config.xml:<managed-bean> <managed-bean-name>user</managed-bean-name> <managed-bean-class>org.jboss.seam.example.registration.User</managed-bean-class> <managed-bean-scope>request</managed-bean-scope> </managed-bean>
This time the bean is indeed created, I can see the content I set on the bean. So I assume JBoss failed to create the User bean, baybe it failed to get the annodation from @Name("user") I don't know.
Could you give me a hint where shall I look at to find out the cause of the problem.
From the discussion, I understand that it may be because that the embedded Ejb container has not started properly, but there is no any exception or error message (in the log) when the first page is loaded and I have followed the exact procedure in the readme.txt.
I assume it maybe because of the database connection it have not created the bean silently so I removed the meta tags @Entity and @Table from User.java code to make it pure Java Bean, but still JBoss seam have not created User Bean and there is no error or exception.
I though that SeamPhaseListener in faces-config.xml should be enough to make the JBossSeam injection to work on pure Java Beans in JSF, but apparantly there is more story in it.<lifecycle> <phase-listener>org.jboss.seam.jsf.SeamPhaseListener</phase-listener> </lifecycle>
I will be very appreciate if you give me a hint about where shall I look to solve this problem. -
23. Re: problem in a simple seam application
mnrz Oct 21, 2006 2:41 AM (in response to mnrz)dilshat
yes this error is when your embedde Ejb doesnt start properly, at the first I had this conversion error and no exception, but after putting SeamExceptionFilter (declare it in web.xml) the exception messages will be displayed. so try to put this filter.
and another thing is your application structure, look at my structure I have showed above, your application should be like that.
now my embedde Ejb is working fine but I think the Seam cant connect to database and instantiate user class. I am completely confused.
cja987,
thanks for your reply, let me know do I understand your mean. you said that I place the things in component.properties into components.xml?? is it right? if yes I did it before but if I didnt understand your meaning this is because of my poor english please explain more.
thank you so much. -
24. Re: problem in a simple seam application
mnrz Oct 21, 2006 3:55 AM (in response to mnrz)Hi Gavin
I take a look at chapter 9 of the Seam configuration documentation, it is said that we should copy any files located in embedded-ejb/conf in our application classpath, so I copy them in WEB-INF/classes folder and now this exception appears to the console:
Do you have any idea? Do I have to put those file in classpath?
thank you in advance.(core.Ejb 94 ) starting the embedded EJB container (dependency.AbstractKernelController 350 ) Error installing to Start: name=TransactionManagerInitializer state =Create javax.naming.NameAlreadyBoundException at org.jnp.server.NamingServer.bind(NamingServer.java:144) at org.jnp.interfaces.NamingContext.bind(NamingContext.java:567) at org.jnp.interfaces.NamingContext.bind(NamingContext.java:532) at javax.naming.InitialContext.bind(InitialContext.java:359) at org.jboss.tm.TransactionManagerInitializer.bindRef(TransactionManagerInitializer.java:690) at org.jboss.tm.TransactionManagerInitializer.start(TransactionManagerInitializer.java:145) 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:585) at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:55) at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:107 ) at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66) at org.jboss.kernel.plugins.dependency.KernelControllerContextActions.dispatchJoinPoint(KernelControll erContextActions.java:100) at org.jboss.kernel.plugins.dependency.KernelControllerContextActions$LifecycleAction.installAction(Ke rnelControllerContextActions.java:582) at org.jboss.kernel.plugins.dependency.KernelControllerContextActions$KernelControllerContextAction.in stall(KernelControllerContextActions.java:175) at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActi ons.java:51) at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:226) at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:593) at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:346) at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:438) at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:379) at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:225) at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:151) at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deployBean(AbstractKernelDeployer.java:2 91) at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deployBeans(AbstractKernelDeployer.java: 261) at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deploy(AbstractKernelDeployer.java:117) at org.jboss.kernel.plugins.deployment.xml.BeanXMLDeployer.deploy(BeanXMLDeployer.java:95) at org.jboss.ejb3.embedded.EJB3StandaloneBootstrap.boot(EJB3StandaloneBootstrap.java:380) at org.jboss.seam.core.Ejb.startup(Ejb.java:38) 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:585) at org.jboss.seam.util.Reflections.invoke(Reflections.java:13) at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:32) at org.jboss.seam.Component.callComponentMethod(Component.java:1334) at org.jboss.seam.Component.callCreateMethod(Component.java:1322) at org.jboss.seam.Component.newInstance(Component.java:1312) at org.jboss.seam.Component.getInstance(Component.java:1263) at org.jboss.seam.Component.getInstance(Component.java:1253) at org.jboss.seam.contexts.Lifecycle.startup(Lifecycle.java:125) at org.jboss.seam.contexts.Lifecycle.endInitialization(Lifecycle.java:104) at org.jboss.seam.init.Initialization.init(Initialization.java:196) at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:32) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3669) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4104) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524) at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:788) at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:677) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:473) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1102) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020) at org.apache.catalina.core.StandardHost.start(StandardHost.java:718) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442) at org.apache.catalina.core.StandardService.start(StandardService.java:450) at org.apache.catalina.core.StandardServer.start(StandardServer.java:683) at org.apache.catalina.startup.Catalina.start(Catalina.java:537) 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:585) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409) java.lang.RuntimeException: java.lang.IllegalArgumentException: Null name at org.jboss.ejb3.embedded.EJB3StandaloneBootstrap.boot(EJB3StandaloneBootstrap.java:391) at org.jboss.seam.core.Ejb.startup(Ejb.java:38) 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:585) at org.jboss.seam.util.Reflections.invoke(Reflections.java:13) at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:32) at org.jboss.seam.Component.callComponentMethod(Component.java:1334) at org.jboss.seam.Component.callCreateMethod(Component.java:1322) at org.jboss.seam.Component.newInstance(Component.java:1312) at org.jboss.seam.Component.getInstance(Component.java:1263) at org.jboss.seam.Component.getInstance(Component.java:1253) at org.jboss.seam.contexts.Lifecycle.startup(Lifecycle.java:125) at org.jboss.seam.contexts.Lifecycle.endInitialization(Lifecycle.java:104) at org.jboss.seam.init.Initialization.init(Initialization.java:196) at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:32) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3669) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4104) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524) at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:788) at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:677) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:473) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1102) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020) at org.apache.catalina.core.StandardHost.start(StandardHost.java:718) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442) at org.apache.catalina.core.StandardService.start(StandardService.java:450) at org.apache.catalina.core.StandardServer.start(StandardServer.java:683) at org.apache.catalina.startup.Catalina.start(Catalina.java:537) 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:585) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409) Caused by: java.lang.IllegalArgumentException: Null name at org.jboss.dependency.plugins.AbstractController.getContext(AbstractController.java:101) at org.jboss.kernel.plugins.dependency.AbstractKernelController.getContext(AbstractKernelController.ja va:94) at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.internalValidate(AbstractKernelDeployer. java:229) at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.validate(AbstractKernelDeployer.java:161 ) at org.jboss.ejb3.embedded.EJB3StandaloneBootstrap.boot(EJB3StandaloneBootstrap.java:381) ... 40 more ([localhost].[/registration] 119 ) Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener java.lang.RuntimeException: java.lang.IllegalArgumentException: Null name at org.jboss.ejb3.embedded.EJB3StandaloneBootstrap.boot(EJB3StandaloneBootstrap.java:391) at org.jboss.seam.core.Ejb.startup(Ejb.java:38) 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:585) at org.jboss.seam.util.Reflections.invoke(Reflections.java:13) at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:32) at org.jboss.seam.Component.callComponentMethod(Component.java:1334) at org.jboss.seam.Component.callCreateMethod(Component.java:1322) at org.jboss.seam.Component.newInstance(Component.java:1312) at org.jboss.seam.Component.getInstance(Component.java:1263) at org.jboss.seam.Component.getInstance(Component.java:1253) at org.jboss.seam.contexts.Lifecycle.startup(Lifecycle.java:125) at org.jboss.seam.contexts.Lifecycle.endInitialization(Lifecycle.java:104) at org.jboss.seam.init.Initialization.init(Initialization.java:196) at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:32) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3669) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4104) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524) at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:788) at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:677) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:473) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1102) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020) at org.apache.catalina.core.StandardHost.start(StandardHost.java:718) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442) at org.apache.catalina.core.StandardService.start(StandardService.java:450) at org.apache.catalina.core.StandardServer.start(StandardServer.java:683) at org.apache.catalina.startup.Catalina.start(Catalina.java:537) 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:585) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409) Caused by: java.lang.IllegalArgumentException: Null name at org.jboss.dependency.plugins.AbstractController.getContext(AbstractController.java:101) at org.jboss.kernel.plugins.dependency.AbstractKernelController.getContext(AbstractKernelController.ja va:94) at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.internalValidate(AbstractKernelDeployer. java:229) at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.validate(AbstractKernelDeployer.java:161 ) at org.jboss.ejb3.embedded.EJB3StandaloneBootstrap.boot(EJB3StandaloneBootstrap.java:381) ... 40 more (core.StandardContext 114 ) Error listenerStart (core.StandardContext 114 ) Context [/registration] startup failed due to previous errors (core.Ejb 94 ) stopping the embedded EJB container java.lang.NullPointerException at org.jboss.seam.core.Ejb.shutdown(Ejb.java:66) 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:585) at org.jboss.seam.util.Reflections.invoke(Reflections.java:13) at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:32) at org.jboss.seam.contexts.Contexts.callDestroyMethod(Contexts.java:211) at org.jboss.seam.contexts.Contexts.destroy(Contexts.java:189) at org.jboss.seam.contexts.Lifecycle.endApplication(Lifecycle.java:134) at org.jboss.seam.servlet.SeamListener.contextDestroyed(SeamListener.java:37) at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:3710) at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4283) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4132) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524) at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:788) at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:677) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:473) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1102) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020) at org.apache.catalina.core.StandardHost.start(StandardHost.java:718) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442) at org.apache.catalina.core.StandardService.start(StandardService.java:450) at org.apache.catalina.core.StandardServer.start(StandardServer.java:683) at org.apache.catalina.startup.Catalina.start(Catalina.java:537) 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:585) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409) (contexts.Contexts 109 ) Could not destroy component: org.jboss.seam.core.ejb java.lang.NullPointerException at org.jboss.seam.core.Ejb.shutdown(Ejb.java:66) 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:585) at org.jboss.seam.util.Reflections.invoke(Reflections.java:13) at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:32) at org.jboss.seam.contexts.Contexts.callDestroyMethod(Contexts.java:211) at org.jboss.seam.contexts.Contexts.destroy(Contexts.java:189) at org.jboss.seam.contexts.Lifecycle.endApplication(Lifecycle.java:134) at org.jboss.seam.servlet.SeamListener.contextDestroyed(SeamListener.java:37) at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:3710) at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4283) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4132) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524) at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:788) at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:677) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:473) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1102) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020) at org.apache.catalina.core.StandardHost.start(StandardHost.java:718) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442) at org.apache.catalina.core.StandardService.start(StandardService.java:450) at org.apache.catalina.core.StandardServer.start(StandardServer.java:683) at org.apache.catalina.startup.Catalina.start(Catalina.java:537) 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:585) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409) (http11.Http11Protocol 94 ) Starting Coyote HTTP/1.1 on http-80 (common.ChannelSocket 94 ) JK: ajp13 listening on /0.0.0.0:8009 (server.JkMain 94 ) Jk running ID=0 time=16/250 config=null (storeconfig.StoreLoader 94 ) Find registry server-registry.xml at classpath resource (startup.Catalina 94 ) Server startup in 34297 ms
-
25. Re: problem in a simple seam application
mnrz Oct 22, 2006 8:16 AM (in response to mnrz)RESOLVED
Hi All
after many toiling I could resolve the problem. it is something bizarre!!!
in the persistence.xml I put following property because I am using MySql:<property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect" />
but after googling and surfing many pages (maybe all the web ;) ) I found a document in german language and I could understands only its codes and I see they used following property with MySql Database connection:<property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect" />
and now it is working, I dont understand why we should use HSQLDialect rather than MySQLDialect whereas we are going to connect to mysql ???
if anyone knows I am looking forward to know as well.
any way, Thank you all people participating in this thread and I appreciate every comment you leave.
-
26. Re: problem in a simple seam application
pmuir Oct 23, 2006 5:05 AM (in response to mnrz)That doesn't seem right to me. When I connect to HSQL datasource i use HSQLDialect, and when I connect to MySQL I use MySQLDialect. I would chase this up on the hibernate or EJB3 forum.
-
27. Re: problem in a simple seam application
dilshat Oct 23, 2006 8:13 AM (in response to mnrz)Mohammad,
Thank your so much for your kind suggestion. Yes, now I can use the Seam created Java Beans inside JSF now, no more managed-beans. This is really exciting.
Now the next thing is how to connect to the database, I am now having problem with database connection. please let me know if you have solved the problem. -
28. Re: problem in a simple seam application[RESOLVED]
mnrz Oct 23, 2006 8:26 AM (in response to mnrz)dilshat,
in order to connect to database, you need persistence.xml and jboss-beans.xml.
you can find those files in this very topic .
but it is better to put your messages in another thread and prevent this topic to be more complex than currently is.
I put another topic with subject "How to configure an embedded Ejb to connect to MySql?" you can put your files and codes and any exception message on that topic and I will answer you.