Hibernate & JSF page

Hello,

I want to learn about Hibernate and I read this tutorial to learn something:

http://www.netbeans.org/kb/articles/hibernate-javaee.html

I installed hibernate as understood in the tutorial. then I created entity classes using Netbeans. after that I created jsf pages for these entity classes using Netbeans' wizard. everything went well but when I run the application I get the error:

HTTP Status 503 -

type Status report

message

descriptionThe requested service () is not currently available.

Sun Java System Application Server 9.1

What's my problem?

[640 byte] By [xyzta] at [2007-11-27 9:40:25]
# 1
Check the server console or log file if you see any worthful exceptions and stacktraces.
BalusCa at 2007-7-12 23:17:33 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

Thats the log file of Sun App Server

Jul 7, 2007 10:56:48 PM com.sun.enterprise.admin.servermgmt.launch.ASLauncher buildCommand

INFO:

C:/Sun/SDK/jdk\bin\java

-client

-XX:+UnlockDiagnosticVMOptions

-XX:MaxPermSize=192m

-Xmx512m

-XX:NewRatio=2

-XX:+LogVMOutput

-XX:LogFile=C:/Sun/SDK/domains/domain1/logs/jvm.log

-Dcom.sun.aas.ClassPathPrefix=

-Dcom.sun.aas.ClassPathSuffix=

-Dcom.sun.aas.ServerClassPath=

-Dcom.sun.aas.classloader.appserverChainJars.ee=

-Dcom.sun.aas.classloader.appserverChainJars=admin-cli.jar,admin-cli-ee.jar,dbschema.jar,j2ee-svc.jar

-Dcom.sun.aas.classloader.optionalOverrideableChain.ee=

-Dcom.sun.aas.classloader.optionalOverrideableChain=webservices-rt.jar,webservices-tools.jar,commons-logging.jar,commons-launcher.jar

-Dcom.sun.aas.classloader.serverClassPath.ee=Does not exist/lib/hadbjdbc4.jar,C:/Sun/SDK/lib/SUNWjdmk/5.1/lib/jdmkrt.jar,Does not exist/lib/dbstate.jar,Does not exist/lib/hadbm.jar,Does not exist/lib/hadbmgt.jar,C:/Sun/SDK/lib/SUNWmfwk/lib/mfwk_instrum_tk.jar

-Dcom.sun.aas.classloader.serverClassPath=C:/Sun/SDK/lib/install/applications/jmsra/imqjmsra.jar,C:/Sun/SDK/imq/lib/jaxm-api.jar,C:/Sun/SDK/imq/lib/fscontext.jar,C:/Sun/SDK/imq/lib/imqbroker.jar,C:/Sun/SDK/imq/lib/imqjmx.jar,C:/Sun/SDK/lib/ant/lib/ant.jar,C:/Sun/SDK/lib/SUNWjdmk/5.1/lib/jdmkrt.jar

-Dcom.sun.aas.classloader.sharedChainJars.ee=appserv-se.jar,appserv-ee.jar,Does not exist/lib/dbstate.jar,Does not exist/lib/hadbjdbc4.jar,jgroups-all.jar,C:/Sun/SDK/lib/SUNWmfwk/lib/mfwk_instrum_tk.jar

-Dcom.sun.aas.classloader.sharedChainJars=javaee.jar,C:/Sun/SDK/jdk/lib/tools.jar,install/applications/jmsra/imqjmsra.jar,commons-launcher.jar,C:/Sun/SDK/imq/lib/jaxm-api.jar,C:/Sun/SDK/imq/lib/fscontext.jar,C:/Sun/SDK/imq/lib/imqbroker.jar,C:/Sun/SDK/imq/lib/imqjmx.jar,C:/Sun/SDK/imq/lib/imqxm.jar,C:/Sun/SDK/lib/ant/lib/ant.jar,webservices-rt.jar,webservices-tools.jar,mail.jar,jsf-api.jar,jsf-impl.jar,appserv-jstl.jar,appserv-env.jar,jmxremote_optional.jar,C:/Sun/SDK/lib/SUNWjdmk/5.1/lib/jdmkrt.jar,commons-logging.jar,activation.jar,appserv-rt.jar,appserv-admin.jar,appserv-cmp.jar,C:/Sun/SDK/updatecenter/lib/updatecenter.jar,C:/Sun/SDK/jbi/lib/jbi.jar

-Dcom.sun.aas.configName=server-config

-Dcom.sun.aas.configRoot=C:/Sun/SDK/config

-Dcom.sun.aas.defaultLogFile=C:/Sun/SDK/domains/domain1/logs/server.log

-Dcom.sun.aas.domainName=domain1

-Dcom.sun.aas.installRoot=C:/Sun/SDK

-Dcom.sun.aas.instanceName=server

-Dcom.sun.aas.instanceRoot=C:/Sun/SDK/domains/domain1

-Dcom.sun.aas.processLauncher=SE

-Dcom.sun.aas.promptForIdentity=true

-Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory

-Dcom.sun.enterprise.overrideablejavaxpackages=javax.help,javax.portlet

-Dcom.sun.enterprise.taglibs=appserv-jstl.jar,jsf-impl.jar

-Dcom.sun.enterprise.taglisteners=jsf-impl.jar

-Dcom.sun.updatecenter.home=C:/Sun/SDK/updatecenter

-Ddomain.name=domain1

-Djava.endorsed.dirs=C:/Sun/SDK/lib/endorsed

-Djava.ext.dirs=C:/Sun/SDK/jdk/lib/ext;C:/Sun/SDK/jdk/jre/lib/ext;C:/Sun/SDK/domains/domain1/lib/ext;C:/Sun/SDK/javadb/lib

-Djava.library.path=C:\Sun\SDK\lib;C:\Sun\SDK\lib;C:\Sun\SDK\bin;C:\Sun\SDK\bin

-Djava.security.auth.login.config=C:/Sun/SDK/domains/domain1/config/login.conf

-Djava.security.policy=C:/Sun/SDK/domains/domain1/config/server.policy

-Djava.util.logging.manager=com.sun.enterprise.server.logging.ServerLogManager

-Djavax.management.builder.initial=com.sun.enterprise.admin.server.core.jmx.AppServerMBeanServerBuilder

-Djavax.net.ssl.keyStore=C:/Sun/SDK/domains/domain1/config/keystore.jks

-Djavax.net.ssl.trustStore=C:/Sun/SDK/domains/domain1/config/cacerts.jks

-Djdbc.drivers=org.apache.derby.jdbc.ClientDriver

-Djmx.invoke.getters=true

-Dsun.rmi.dgc.client.gcInterval=3600000

-Dsun.rmi.dgc.server.gcInterval=3600000

-cp

;C:/Sun/SDK/lib/appserv-launch.jar

com.sun.enterprise.server.PELaunch

start

Jul 7, 2007 10:56:48 PM com.sun.enterprise.admin.servermgmt.launch.ASLauncher process

INFO: goodbye

[#|2007-07-07T22:56:49.750+0300|INFO|sun-appserver9.1|javax.enterprise.system.core|_ThreadID=10;_ThreadName=main;|Starting Sun Java System Application Server 9.1 (build b41d-beta2) ...|#]

[#|2007-07-07T22:56:51.343+0300|INFO|sun-appserver9.1|javax.enterprise.system.core|_ThreadID=10;_ThreadName=main;|CORE5098: AS Socket Service Initialization has been completed.|#]

[#|2007-07-07T22:56:51.578+0300|INFO|sun-appserver9.1|javax.enterprise.system.core|_ThreadID=10;_ThreadName=main;Java HotSpot(TM) Client VM;1.6.0_01;Sun Microsystems Inc.;|CORE5076: Using [Java HotSpot(TM) Client VM, Version 1.6.0_01] from [Sun Microsystems Inc.]|#]

[#|2007-07-07T22:56:51.656+0300|INFO|sun-appserver9.1|javax.enterprise.system.core.security|_ThreadID=10;_ThreadName=main;|SEC1002: Security Manager is OFF.|#]

[#|2007-07-07T22:56:54.812+0300|INFO|sun-appserver9.1|javax.enterprise.system.tools.admin|_ThreadID=10;_ThreadName=main;|ADM0001:MBeanServer initialized successfully|#]

[#|2007-07-07T22:56:55.109+0300|INFO|sun-appserver9.1|javax.enterprise.system.core.security|_ThreadID=10;_ThreadName=main;com.sun.enterprise.security.provider.PolicyWrapper;|SEC1143: Loading policy provider com.sun.enterprise.security.provider.PolicyWrapper.|#]

[#|2007-07-07T22:56:56.406+0300|INFO|sun-appserver9.1|javax.enterprise.system.stream.out|_ThreadID=10;_ThreadName=main;|RMIClient.getRMIClient: server|#]

[#|2007-07-07T22:56:56.796+0300|INFO|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=10;_ThreadName=main;server;|WEB0114: SSO is disabled in virtual server [server]|#]

[#|2007-07-07T22:56:56.812+0300|INFO|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=10;_ThreadName=main;__asadmin;|WEB0114: SSO is disabled in virtual server [__asadmin]|#]

[#|2007-07-07T22:56:58.125+0300|INFO|sun-appserver9.1|javax.enterprise.system.tools.admin|_ThreadID=10;_ThreadName=main;|ADM1079: Initialization of AMX MBeans successful|#]

[#|2007-07-07T22:56:59.265+0300|INFO|sun-appserver9.1|javax.enterprise.system.tools.admin|_ThreadID=11;_ThreadName=Thread-17;service:jmx:rmi:///jndi/rmi://haluk-9be9147ab:8686/jmxrmi;|ADM1504: Here is the JMXServiceURL for the Standard JMXConnectorServer: [service:jmx:rmi:///jndi/rmi://haluk-9be9147ab:8686/jmxrmi]. This is where the remote administrative clients should connect using the standard JMX connectors|#]

[#|2007-07-07T22:56:59.265+0300|INFO|sun-appserver9.1|javax.enterprise.system.tools.admin|_ThreadID=11;_ThreadName=Thread-17;true;|ADM1506: Status of Standard JMX Connector: Active = [true]|#]

[#|2007-07-07T22:57:00.671+0300|INFO|sun-appserver9.1|com.sun.jbi.framework|_ThreadID=10;_ThreadName=main;|JBIFW0010: JBI framework ready to accept requests.|#]

[#|2007-07-07T22:57:00.796+0300|INFO|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=10;_ThreadName=main;|WEB0302: Starting Sun-Java-System/Application-Server.|#]

[#|2007-07-07T22:57:02.093+0300|INFO|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=10;_ThreadName=main;8080;|WEB0712: Starting Sun-Java-System/Application-Server HTTP/1.1 on 8080|#]

[#|2007-07-07T22:57:02.281+0300|INFO|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=10;_ThreadName=main;8181;|WEB0712: Starting Sun-Java-System/Application-Server HTTP/1.1 on 8181|#]

[#|2007-07-07T22:57:02.328+0300|INFO|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=10;_ThreadName=main;4848;|WEB0712: Starting Sun-Java-System/Application-Server HTTP/1.1 on 4848|#]

[#|2007-07-07T22:57:03.375+0300|INFO|sun-appserver9.1|javax.enterprise.system.core.naming|_ThreadID=10;_ThreadName=main;java:comp/env/web.ManufacturerController/emf;|naming.bind|#]

[#|2007-07-07T22:57:03.390+0300|INFO|sun-appserver9.1|org.apache.catalina.loader.WebappClassLoader|_ThreadID=10;_ThreadName=main;|validateJarFile(C:\Documents and Settings\proje\WebApplication7\build\web\WEB-INF\lib\javaee.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class|#]

[#|2007-07-07T22:57:04.296+0300|SEVERE|sun-appserver9.1|com.sun.org.apache.commons.modeler.Registry|_ThreadID=10;_ThreadName=main;_RequestID=c163aded-7924-4f05-97d9-d05b60abb1d8;|Null component com.sun.appserv:type=JspMonitor,name=jsp,WebModule=//server/WebApplication7,J2EEApplication=null,J2EEServer=server|#]

[#|2007-07-07T22:57:04.625+0300|SEVERE|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=10;_ThreadName=main;_RequestID=c163aded-7924-4f05-97d9-d05b60abb1d8;|WEB0190: Error starting virtual server StandardEngine[com.sun.appserv].StandardHost[server]

java.util.MissingResourceException: Can't find resource for bundle java.util.PropertyResourceBundle, key virtualServer.startContextError

at java.util.ResourceBundle.getObject(ResourceBundle.java:386)

at java.util.ResourceBundle.getString(ResourceBundle.java:346)

at com.sun.enterprise.web.VirtualServer.startChildren(VirtualServer.java:1575)

at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1218)

at org.apache.catalina.core.StandardHost.start(StandardHost.java:938)

at com.sun.enterprise.web.LifecycleStarter.doRun(LifecycleStarter.java:45)

at com.sun.appserv.management.util.misc.RunnableBase.runSync(RunnableBase.java:283)

at com.sun.appserv.management.util.misc.RunnableBase._submit(RunnableBase.java:155)

at com.sun.appserv.management.util.misc.RunnableBase.submit(RunnableBase.java:171)

at com.sun.enterprise.web.EmbeddedWebContainer$WebEngine.startChildren(EmbeddedWebContainer.java:440)

at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1218)

at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:520)

at org.apache.catalina.startup.Embedded.start(Embedded.java:923)

at com.sun.enterprise.web.WebContainer.start(WebContainer.java:852)

at com.sun.enterprise.web.PEWebContainer.startInstance(PEWebContainer.java:750)

at com.sun.enterprise.web.PEWebContainerLifecycle.onStartup(PEWebContainerLifecycle.java:71)

at com.sun.enterprise.server.ApplicationServer.onStartup(ApplicationServer.java:332)

at com.sun.enterprise.server.ondemand.OnDemandServer.onStartup(OnDemandServer.java:112)

at com.sun.enterprise.server.PEMain.run(PEMain.java:381)

at com.sun.enterprise.server.PEMain.main(PEMain.java:308)

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 com.sun.enterprise.server.PELaunch.main(PELaunch.java:274)

|#]

[#|2007-07-07T22:57:04.750+0300|INFO|sun-appserver9.1|javax.enterprise.system.core.selfmanagement|_ThreadID=10;_ThreadName=main;|SMGT0007: Self Management Rules service is enabled|#]

[#|2007-07-07T22:57:05.437+0300|INFO|sun-appserver9.1|javax.enterprise.system.core|_ThreadID=10;_ThreadName=main;|Application server startup complete.|#]

[#|2007-07-07T22:57:44.078+0300|INFO|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=12;_ThreadName=RMI TCP Connection(6)-127.0.0.1;|WEB0303: Stopping Sun-Java-System/Application-Server.|#]

[#|2007-07-07T22:57:44.078+0300|INFO|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=12;_ThreadName=RMI TCP Connection(6)-127.0.0.1;8080;|WEB0713: Stopping Sun-Java-System/Application-Server HTTP/1.1 on 8080|#]

[#|2007-07-07T22:57:44.937+0300|INFO|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=12;_ThreadName=RMI TCP Connection(6)-127.0.0.1;8181;|WEB0713: Stopping Sun-Java-System/Application-Server HTTP/1.1 on 8181|#]

[#|2007-07-07T22:57:45.328+0300|INFO|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=12;_ThreadName=RMI TCP Connection(6)-127.0.0.1;4848;|WEB0713: Stopping Sun-Java-System/Application-Server HTTP/1.1 on 4848|#]

[#|2007-07-07T22:57:55.406+0300|SEVERE|sun-appserver9.1|org.apache.catalina.core.ContainerBase|_ThreadID=12;_ThreadName=RMI TCP Connection(6)-127.0.0.1;_RequestID=6c33e900-c7e1-4aa9-9e02-ebe1ae49abbd;|PWC1415: Error stopping container StandardEngine[com.sun.appserv].StandardHost[server]

LifecycleException: PWC1367: Pipeline has not been started

at org.apache.catalina.core.StandardPipeline.stop(StandardPipeline.java:303)

at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1265)

at com.sun.enterprise.web.VirtualServer.stop(VirtualServer.java:407)

at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1273)

at org.apache.catalina.core.StandardEngine.stop(StandardEngine.java:525)

at org.apache.catalina.startup.Embedded.stop(Embedded.java:957)

at com.sun.enterprise.web.WebContainer.stop(WebContainer.java:922)

at com.sun.enterprise.web.PEWebContainer.stopInstance(PEWebContainer.java:774)

at com.sun.enterprise.web.PEWebContainerLifecycle.onShutdown(PEWebContainerLifecycle.java:82)

at com.sun.enterprise.server.ApplicationServer.onShutdown(ApplicationServer.java:446)

at com.sun.enterprise.server.ondemand.OnDemandServer.onShutdown(OnDemandServer.java:123)

at com.sun.enterprise.server.Shutdown.startShutdown(Shutdown.java:62)

at com.sun.enterprise.admin.event.AdminEventMulticaster.invokeShutdownEventListener(AdminEventMulticaster.java:1478)

at com.sun.enterprise.admin.event.AdminEventMulticaster.handleShutdownEvent(AdminEventMulticaster.java:1467)

at com.sun.enterprise.admin.event.AdminEventMulticaster.processEvent(AdminEventMulticaster.java:464)

at com.sun.enterprise.admin.event.AdminEventMulticaster.multicastEvent(AdminEventMulticaster.java:160)

at com.sun.enterprise.admin.server.core.channel.AdminChannelServer.sendNotification(AdminChannelServer.java:108)

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 sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)

at sun.rmi.transport.Transport$1.run(Transport.java:159)

at java.security.AccessController.doPrivileged(Native Method)

at sun.rmi.transport.Transport.serviceCall(Transport.java:155)

at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)

at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)

at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)

at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)

at java.lang.Thread.run(Thread.java:619)

|#]

[#|2007-07-07T22:57:55.406+0300|INFO|sun-appserver9.1|javax.enterprise.system.core|_ThreadID=12;_ThreadName=RMI TCP Connection(6)-127.0.0.1;|CORE5051: Shutting down all J2EE applications ...|#]

[#|2007-07-07T22:57:55.406+0300|INFO|sun-appserver9.1|javax.enterprise.system.core|_ThreadID=12;_ThreadName=RMI TCP Connection(6)-127.0.0.1;|CORE 5060 : Stopping all J2EE Connector 1.5 Compliant resource adapters ...|#]

[#|2007-07-07T22:57:55.406+0300|INFO|sun-appserver9.1|javax.enterprise.resource.resourceadapter|_ThreadID=12;_ThreadName=RMI TCP Connection(6)-127.0.0.1;__ds;|RAR7094: __ds shutdown successful.|#]

[#|2007-07-07T22:57:55.406+0300|INFO|sun-appserver9.1|javax.enterprise.system.core|_ThreadID=12;_ThreadName=RMI TCP Connection(6)-127.0.0.1;|CORE 5061 : Resource adapters Stop() Complete|#]

[#|2007-07-07T22:57:55.406+0300|INFO|sun-appserver9.1|javax.enterprise.system.core|_ThreadID=12;_ThreadName=RMI TCP Connection(6)-127.0.0.1;|CORE5052: Application shutdown complete.|#]

[#|2007-07-07T22:57:55.468+0300|INFO|sun-appserver9.1|javax.enterprise.system.tools.deployment|_ThreadID=12;_ThreadName=RMI TCP Connection(6)-127.0.0.1;|[AutoDeploy] Disabling AutoDeployment service.|#]

[#|2007-07-07T22:57:55.796+0300|INFO|sun-appserver9.1|com.sun.jbi.framework|_ThreadID=12;_ThreadName=RMI TCP Connection(6)-127.0.0.1;|JBIFW0042: JBI framework termination complete.|#]

xyzta at 2007-7-12 23:17:33 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3

I discovered that the problem occurs because of this line:

@PersistenceUnit (unitName = "WebApplication9PU")

private EntityManagerFactory emf;

Altough an entitiy exists in persistance.xml, when I use this line the web server gives error 503 when I run the application...

xyzta at 2007-7-12 23:17:33 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...