Я пытаюсь реализовать базовое веб -приложение базы данных в Netbeans с использованием лиц Java Server и базы данных Java. Но всякий раз, когда я пытаюсь развернуть приложение, я получаю следующее сообщение об ошибке: < /p>
Exception while deploying the app [Vehicles_of_Interest_Web] : JNDI lookup failed for the resource: Name: [Vehicles_of_Interest_WebPU], Lookup: [jdbc:derby://localhost:1527/VehiclesOfInterest [VehiclesOfInterest on VEHICLESOFINTEREST]], Type: [javax.sql.DataSource]
javax.naming.NamingException: Lookup failed for 'jdbc:derby://localhost:1527/VehiclesOfInterest [VehiclesOfInterest on VEHICLESOFINTEREST]' in SerialContext[myEnv={java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming} [Root exception is javax.naming.NameNotFoundException: jdbc:derby:]
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:467)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:414)
at javax.naming.InitialContext.lookup(InitialContext.java:417)
at javax.naming.InitialContext.lookup(InitialContext.java:417)
at com.sun.enterprise.deployment.util.ResourceValidator.validateJNDIRefs(ResourceValidator.java:813)
at com.sun.enterprise.deployment.util.ResourceValidator.validateResources(ResourceValidator.java:692)
at com.sun.enterprise.deployment.util.ResourceValidator.event(ResourceValidator.java:109)
at org.glassfish.kernel.event.EventsImpl.send(EventsImpl.java:107)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:399)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:195)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:467)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:516)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:512)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:360)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:511)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:542)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:534)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:360)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:533)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1441)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1300(CommandRunnerImpl.java:86)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1823)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1699)
at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:510)
at com.sun.enterprise.v3.admin.AdminAdapter.onMissingResource(AdminAdapter.java:200)
at org.glassfish.grizzly.http.server.StaticHttpHandlerBase.service(StaticHttpHandlerBase.java:150)
at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:440)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:144)
at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:174)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:153)
at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:196)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:88)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:246)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:178)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:118)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:96)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:51)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:510)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:82)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:83)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:34)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:101)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:535)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:515)
at java.lang.Thread.run(Thread.java:750)
Caused by: javax.naming.NameNotFoundException: jdbc:derby:
at com.sun.enterprise.naming.impl.TransientContext.resolveContext(TransientContext.java:275)
at com.sun.enterprise.naming.impl.TransientContext.lookup(TransientContext.java:183)
at com.sun.enterprise.naming.impl.SerialContextProviderImpl.lookup(SerialContextProviderImpl.java:42)
at com.sun.enterprise.naming.impl.LocalSerialContextProviderImpl.lookup(LocalSerialContextProviderImpl.java:90)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:454)
... 46 more
< /code>
Я использую Netbeans 26 и Glassfish 8.0. Моим процессом создания кода было создание базы данных в JavaScript, создание веб -приложения через Java с ANT, выбор лиц JavaScript в качестве структуры и Glassfish 8.0 в качестве моего сервера. Затем я сгенерировал классы, перейдя в New -> Java W/ Ant -> Persistence -> Классы организации из базы данных, импортируя все таблицы. Затем я сгенерировал страницы, используя новые -> java w/ ant -> Persistence -> JSF -страницы для классов организации, опять же импортируя все организации. Когда я пытаюсь развернуть приложение, я получаю приведенную выше ошибку. Я также пытался создать новый файл, но возникает та же проблема. Я новичок в работе с файлами конфигурации, поэтому, пожалуйста, будьте очень явными в любом ответе, который их охватывает.
Manifest-Version: 1.0
< /code>
faces-config.xml
/Bundle
bundle
< /code>
Glassfish-web.xml
/Vehicles_of_Interest_Web
Keep a copy of the generated servlet class' java code.
< /code>
persistence.xml
jdbc:derby://localhost:1527/VehiclesOfInterest [VehiclesOfInterest on VEHICLESOFINTEREST]
model.VehicleOfInterest
false
< /code>
web.xml
jakarta.faces.PROJECT_STAGE
Development
Faces Servlet
jakarta.faces.webapp.FacesServlet
1
Faces Servlet
/faces/*
faces/index.xhtml
Подробнее здесь: https://stackoverflow.com/questions/796 ... t-settings
Jndi поиск сбоя с настройками по умолчанию ⇐ JAVA
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение