• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Restful service in netbeans with glassfish and hibernate

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Netbeans project.
1) create the project JAVA EE Web application
characteristics of the project:
Server: GlassFish Server 4.1
java EE version: JAVA EE 7 Web
Context Path: /RestApp
hibernate 4.3.1
connection name: jdbc:postgresql://localhost:5432/prueba

2)i applied reverse engineering:
hibernate.reveng.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-reverse-engineering PUBLIC "-//Hibernate/Hibernate Reverse Engineering DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-reverse-engineering-3.0.dtd">
<hibernate-reverse-engineering>
<schema-selection match-catalog="prueba" match-schema="public"/>
<table-filter match-name="pro_eje_estrategico"/>
</hibernate-reverse-engineering>

3)hibernate mapping files and POJOs from Database with EJB3 annotations

4)RESTful Web Services from Entity classes
Persistence Unit Name:RestAppPU
presistence provider: Hibernate (JPA 2.1)
Data source:
JNDI Name:jniprueba
database connection: jdbc:postgresql://localhost:5432/prueba
true:Use java transaction APIs
table generation strategy APIs:None

5)when i try to test the service...:
C:\NetBeansProjects\RestApp\nbproject\build-impl.xml:1049: The module has not been deployed.
See the server log for details.
BUILD FAILED (total time: 1 minute 24 seconds)
linea 1049: <nbdeploy clientUrlPart="${client.urlPart}" debugmode="false" forceRedeploy="${forceRedeploy}"/>
i dont understand, why this is happening, can someone help me? thanks

the database:
CREATE DATABASE prueba
WITH OWNER = postgres
ENCODING = 'UTF8'
TABLESPACE = pg_default;
CREATE TABLE public.pro_eje_estrategico (
id_eje_estrategico BIGSERIAL,
descripcion VARCHAR(250) NOT NULL,
usuario_bitacora VARCHAR(50) DEFAULT "current_user"() NOT NULL,
fecha_bitacora TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT now() NOT NULL,
registro_bitacora VARCHAR(50) DEFAULT inet_client_addr() NOT NULL,
CONSTRAINT pro_eje_estrategico_pkey PRIMARY KEY(id_eje_estrategico)
) WITHOUT OIDS;
COMMENT ON COLUMN public.pro_eje_estrategico.id_eje_estrategico
IS 'Identificador de la entidad';
COMMENT ON COLUMN public.pro_eje_estrategico.descripcion
IS 'Descripción del eje estratégico';
COMMENT ON COLUMN public.pro_eje_estrategico.usuario_bitacora
IS 'Da referencia al usuario de creación del control de auditoría en la base de datos.';
COMMENT ON COLUMN public.pro_eje_estrategico.fecha_bitacora
IS 'Identifica la fecha de creación de la auditoría en la base de datos.';
COMMENT ON COLUMN public.pro_eje_estrategico.registro_bitacora
IS 'Da referencia al ip de creación del control de auditoría en la base de datos.';

the code:http://www.mediafire.com/download/328eppe88vaab3m/RestApp.rar
 
reply
    Bookmark Topic Watch Topic
  • New Topic