![]() |
|
Модераторы: LSD, AntonSaburov |
![]()
|
|
| neo03 |
|
|||
|
Новичок Профиль Группа: Участник Сообщений: 36 Регистрация: 8.6.2011 Репутация: нет Всего: нет |
Сделал Ваш пример "Студенческий отдел кадров в виде Enterprise приложения". У меня вместо класса ManagementSystemBean создается класс ManagementSystem. При запуске сервер ругается на EntityManager em. В простейшем приложении я его закомментировал, оно открылось, но к базе, разумеется, я не смог обратиться. У меня NetBeans 7.0, J2EE6 ( и в J2EE5 я тоже делал - эффект тот же.) Там в примере нигде опечаток нет? Если нет, то может быть Вы подскажете в чем дело? С уважением ....
|
|||
|
||||
| Nofate |
|
|||
![]() Опытный ![]() ![]() Профиль Группа: Участник Сообщений: 266 Регистрация: 13.10.2008 Репутация: 4 Всего: 8 |
Покажите хотя бы стэктрэйсы. Как именно ругается?
-------------------- The future is not set, there is no fate but what we make for ourselves. Нофейтово пространство и смежные области |
|||
|
||||
| neo03 |
|
|||
|
Новичок Профиль Группа: Участник Сообщений: 36 Регистрация: 8.6.2011 Репутация: нет Всего: нет |
Стэктрейс StudentsApp (run):
pre-run-deploy: Запуск GlassFish Server 3.1 GlassFish Server 3.1 выполняется. Начальное развертывание StudentsApp на /home/vasiliy/NetBeansProjects/StudentsApp/dist/gfdeploy/StudentsApp Завершено начальное распространение StudentsApp Initializing... deploy?DEFAULT=/home/vasiliy/NetBeansProjects/StudentsApp/dist/gfdeploy/StudentsApp&name=StudentsApp&force=true отказ на GlassFish Server 3.1 Error occurred during deployment: Exception while preparing the app : Could not resolve a persistence unit corresponding to the persistence-context-ref-name [students.logic.ManagementSystem/em] in the scope of the module called [StudentsApp#StudentsApp-ejb.jar]. Please verify your application.. Please see server.log for more details. Exception while invoking class org.glassfish.persistence.jpa.JPADeployer prepare method : java.lang.RuntimeException: Could not resolve a persistence unit corresponding to the persistence-context-ref-name [students.logic.ManagementSystem/em] in the scope of the module called [StudentsApp#StudentsApp-ejb.jar]. Please verify your application. Could not resolve a persistence unit corresponding to the persistence-context-ref-name [students.logic.ManagementSystem/em] in the scope of the module called [StudentsApp#StudentsApp-ejb.jar]. Please verify your application. /home/vasiliy/NetBeansProjects/StudentsApp/nbproject/build-impl.xml:288: Модуль не развернут. at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:210) at org.netbeans.modules.j2ee.ant.Deploy.execute(Deploy.java:106) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) at sun.reflect.GeneratedMethodAccessor51.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:390) at org.apache.tools.ant.Target.performTasks(Target.java:411) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399) at org.apache.tools.ant.Project.executeTarget(Project.java:1368) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) at org.apache.tools.ant.Project.executeTargets(Project.java:1251) at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:284) at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:539) at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153) ПОСТРОЕНИЕ ЗАВЕРШЕНО СО СБОЕМ (общее время: 41 секунд) Стэктрейс GlassFishServer-3.1: Launching GlassFish on Felix platform INFO: Registered org.glassfish.ha.store.adapter.cache.ShoalBackingStoreProxy for persistence-type = replicated in BackingStoreFactoryRegistry INFO: Grizzly Framework 1.9.31 started in: 140ms - bound to [0.0.0.0:8181] INFO: Grizzly Framework 1.9.31 started in: 128ms - bound to [0.0.0.0:4848] INFO: Grizzly Framework 1.9.31 started in: 101ms - bound to [0.0.0.0:7676] INFO: Grizzly Framework 1.9.31 started in: 171ms - bound to [0.0.0.0:8080] INFO: Grizzly Framework 1.9.31 started in: 116ms - bound to [0.0.0.0:3700] INFO: The Admin Console is already installed, but not yet loaded. INFO: SEC1002: Security Manager is OFF. INFO: SEC1010: Entering Security Startup Service INFO: SEC1143: Loading policy provider com.sun.enterprise.security.provider.PolicyWrapper. INFO: SEC1115: Realm [admin-realm] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created. INFO: SEC1115: Realm [file] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created. INFO: SEC1115: Realm [certificate] of classtype [com.sun.enterprise.security.auth.realm.certificate.CertificateRealm] successfully created. INFO: SEC1011: Security Service(s) Started Successfully INFO: WEB0169: Created HTTP listener [http-listener-1] on host/port [0.0.0.0:8080] INFO: WEB0169: Created HTTP listener [http-listener-2] on host/port [0.0.0.0:8181] INFO: WEB0169: Created HTTP listener [admin-listener] on host/port [0.0.0.0:4848] INFO: WEB0171: Created virtual server [server] INFO: WEB0171: Created virtual server [__asadmin] INFO: WEB0172: Virtual server [server] loaded default web module [] INFO: Initializing Mojarra 2.1.0 (FCS 2.1.0-b11) for context '/login' INFO: WEB0671: Loading application [login] at [/login] INFO: CORE10010: Loading application login done in 5 942 ms INFO: Initializing Mojarra 2.1.0 (FCS 2.1.0-b11) for context '/jsfDemo' INFO: WEB0671: Loading application [jsfDemo] at [/jsfDemo] INFO: CORE10010: Loading application jsfDemo done in 510 ms INFO: Hibernate Validator 4.1.0.Final INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver. INFO: Initializing Mojarra 2.1.0 (FCS 2.1.0-b11) for context '/scrumtoys' INFO: Monitoring jndi:/server/scrumtoys/WEB-INF/faces-config.xml for modifications INFO: WEB0671: Loading application [ScrumToys] at [/scrumtoys] INFO: CORE10010: Loading application ScrumToys done in 3 293 ms INFO: WEB0671: Loading application [IFPWAFCAD] at [/IFPWAFCAD] INFO: CORE10010: Loading application IFPWAFCAD done in 396 ms INFO: GlassFish Server Open Source Edition 3.1 (43) startup time : Felix (11 839ms), startup services(11 478ms), total(23 317ms) INFO: User [] from host localhost.localdomain does not have administration access INFO: JMXStartupService: Started JMXConnector, JMXService URL = service:jmx:rmi://vasiliy-desktop:8686/jndi/rmi://vasiliy-desktop:8686/jmxrmi INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver. INFO: WEB0169: Created HTTP listener [http-listener-1] on host/port [0.0.0.0:8080] INFO: Grizzly Framework 1.9.31 started in: 4ms - bound to [0.0.0.0:8080] INFO: WEB0169: Created HTTP listener [http-listener-2] on host/port [0.0.0.0:8181] INFO: Grizzly Framework 1.9.31 started in: 3ms - bound to [0.0.0.0:8181] SEVERE: Exception while invoking class org.glassfish.persistence.jpa.JPADeployer prepare method SEVERE: Exception while invoking class org.glassfish.javaee.full.deployment.EarDeployer prepare method SEVERE: Exception while preparing the app SEVERE: Could not resolve a persistence unit corresponding to the persistence-context-ref-name [students.logic.ManagementSystem/em] in the scope of the module called [StudentsApp#StudentsApp-ejb.jar]. Please verify your application. org.glassfish.deployment.common.DeploymentException: Could not resolve a persistence unit corresponding to the persistence-context-ref-name [students.logic.ManagementSystem/em] in the scope of the module called [StudentsApp#StudentsApp-ejb.jar]. Please verify your application. at org.glassfish.javaee.full.deployment.EarDeployer.prepare(EarDeployer.java:166) at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:870) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:410) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240) at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:370) at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:355) at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:370) at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1067) at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:96) at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1247) at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235) at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:465) at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:222) at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:168) at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:234) at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:822) at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:719) at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1013) at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225) at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90) at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79) at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54) at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59) at com.sun.grizzly.ContextTask.run(ContextTask.java:71) at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532) at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513) at java.lang.Thread.run(Thread.java:662) Caused by: java.lang.RuntimeException: Could not resolve a persistence unit corresponding to the persistence-context-ref-name [students.logic.ManagementSystem/em] in the scope of the module called [StudentsApp#StudentsApp-ejb.jar]. Please verify your application. at com.sun.enterprise.deployment.BundleDescriptor.findReferencedPUViaEMRef(BundleDescriptor.java:693) at com.sun.enterprise.deployment.BundleDescriptor.findReferencedPUsViaPCRefs(BundleDescriptor.java:681) at com.sun.enterprise.deployment.EjbBundleDescriptor.findReferencedPUs(EjbBundleDescriptor.java:901) at org.glassfish.persistence.jpa.JPADeployer.createEMFs(JPADeployer.java:184) at org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:166) at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:870) at org.glassfish.javaee.full.deployment.EarDeployer.prepareBundle(EarDeployer.java:290) at org.glassfish.javaee.full.deployment.EarDeployer.access$200(EarDeployer.java:86) at org.glassfish.javaee.full.deployment.EarDeployer$1.doBundle(EarDeployer.java:141) at org.glassfish.javaee.full.deployment.EarDeployer$1.doBundle(EarDeployer.java:138) at org.glassfish.javaee.full.deployment.EarDeployer.doOnBundles(EarDeployer.java:215) at org.glassfish.javaee.full.deployment.EarDeployer.doOnAllTypedBundles(EarDeployer.java:224) at org.glassfish.javaee.full.deployment.EarDeployer.doOnAllBundles(EarDeployer.java:250) at org.glassfish.javaee.full.deployment.EarDeployer.prepare(EarDeployer.java:138) ... 29 more SEVERE: Exception while preparing the app : Could not resolve a persistence unit corresponding to the persistence-context-ref-name [students.logic.ManagementSystem/em] in the scope of the module called [StudentsApp#StudentsApp-ejb.jar]. Please verify your application. java.lang.RuntimeException: Could not resolve a persistence unit corresponding to the persistence-context-ref-name [students.logic.ManagementSystem/em] in the scope of the module called [StudentsApp#StudentsApp-ejb.jar]. Please verify your application. at com.sun.enterprise.deployment.BundleDescriptor.findReferencedPUViaEMRef(BundleDescriptor.java:693) at com.sun.enterprise.deployment.BundleDescriptor.findReferencedPUsViaPCRefs(BundleDescriptor.java:681) at com.sun.enterprise.deployment.EjbBundleDescriptor.findReferencedPUs(EjbBundleDescriptor.java:901) at org.glassfish.persistence.jpa.JPADeployer.createEMFs(JPADeployer.java:184) at org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:166) at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:870) at org.glassfish.javaee.full.deployment.EarDeployer.prepareBundle(EarDeployer.java:290) at org.glassfish.javaee.full.deployment.EarDeployer.access$200(EarDeployer.java:86) at org.glassfish.javaee.full.deployment.EarDeployer$1.doBundle(EarDeployer.java:141) at org.glassfish.javaee.full.deployment.EarDeployer$1.doBundle(EarDeployer.java:138) at org.glassfish.javaee.full.deployment.EarDeployer.doOnBundles(EarDeployer.java:215) at org.glassfish.javaee.full.deployment.EarDeployer.doOnAllTypedBundles(EarDeployer.java:224) at org.glassfish.javaee.full.deployment.EarDeployer.doOnAllBundles(EarDeployer.java:250) at org.glassfish.javaee.full.deployment.EarDeployer.prepare(EarDeployer.java:138) at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:870) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:410) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240) at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:370) at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:355) at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:370) at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1067) at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:96) at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1247) at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235) at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:465) at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:222) at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:168) at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:234) at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:822) at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:719) at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1013) at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225) at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90) at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79) at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54) at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59) at com.sun.grizzly.ContextTask.run(ContextTask.java:71) at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532) at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513) at java.lang.Thread.run(Thread.java:662) В общем, SEVERE exception говорят что-то невнятное про ManagementSystem/em |
|||
|
||||
![]()
|
| Правила форума "Java" | |
|
|
Если Вам помогли, и атмосфера форума Вам понравилась, то заходите к нам чаще! С уважением, LSD, AntonSaburov, powerOn, tux, javastic. |
| 0 Пользователей читают эту тему (0 Гостей и 0 Скрытых Пользователей) | |
| 0 Пользователей: | |
| « Предыдущая тема | Java: Общие вопросы | Следующая тема » |
|
|
По вопросам размещения рекламы пишите на vladimir(sobaka)vingrad.ru
Отказ от ответственности Powered by Invision Power Board(R) 1.3 © 2003 IPS, Inc. |