Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Restful service in netbeans with glassfish and hibernate

6b82b4c7-162e-4d4a-af00-ce38b7de9e95Jan 27 2016 — edited Jan 27 2016

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

Comments

We need more info.

What OS are you on?

What JDK are you using?
What version of Oracle are you connected to?

user6545024

Hi, Jeff.

I've got the same problem. As soon as I connect to the DB, supose I write "SELECT * FROM DUAL;" and press F5. No problem. Now I write "SELECT 1/0 FROM DUAL" and execute. The problem whit screen appears.

My OS: Windows 7 Professional 32 bits Service Pack 1

JDK: jdk1.8.0_25

Oracle version: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production

thatJeffSmith-Oracle

I just get a

Error starting at line : 1 in command -

SELECT 1/0 FROM DUAL

Error report -

SQL Error: ORA-01476: divisor is equal to zero

01476. 00000 -  "divisor is equal to zero"

*Cause:   

*Action:

user6545024

The question is I can't see the error text because the screen is not repainting. And in the log window I see the error about RaptorTaskManager.

Gary Graham-Oracle

Some possibilities...

  1. If a freeze is not some sort of deadlock, then it could be a memory limitation.  The fact you are using a 32-bit OS makes me suspicious.  Have you modified the Java -Xms or -Xmx memory limit in your product.conf file?  (In C:\Users\<yourID>\AppData\Roaming\sqldeveloper\4.1.0).  If the setting (even the default) is higher than available RAM, then that could be the problem. Or if it is lower than what SQL Developer needs (depending on what you have been doing and for how long), then you may be experiencing thrashing due to JVM garbage collection.
  2. Are you really using 4.1.0?   In 4.0.x there was a problem with using the Ctrl+C, Ctrl-V copy/paste shortcut keys: SQL Developer Unresponsive
user6545024

Thanks, Gary.

In product.conf every line is commented but one saying "SetJavaHome C:\Program Files\Java\jdk1.8.0_25". And the version is  4.1.0.19. In fact I've being using SQL Developer a long time, and I had this problem with all the versions after 3.2.20.09 (in the same computer, I suppose I need a newer one ).

Gary Graham-Oracle

I suppose I need a newer one

Very probably.  In early 2014 nearly 50% of Win 7 installs were 64-bit, and clock in tech-time spins pretty fast.  If you are stuck on 32-bit, however, the next suggestion is to update your video driver or at least search the web for issues with your video card / driver combination.  I even read of one user blaming a Lenovo mouse driver for the infamous copy/paste hang.  Anyway, good luck!

reckless

Hello,

this seems to be the same issue described on this thread I opened several months ago:

I opened a SR to fix/investigate the issue. this is the bug: 20548707. It's on this state: "44 - Not Feasible to fix, to Filer" Not sure what it means...


I wrote this only to state that I reproduced the issue on different computers (some of them quite new & fast), so I maybe the speed of the computer is not relevant at all. I hope this issue could be fixed son as is quite irritant (also, this issue could be dangerous as you can't know what gone wrong or right in the script output).

Thanks in advance


Gary Graham-Oracle

I believe that bug was put into a "Not Feasible to fix" status because QA could not reproduce the behavior using your test case.  Neither could I.


I assume the problem either has something to do with...

1. your environment (software / hardware).

2. corruption in your user profile settings: C:\Users\<yourUserid>\AppData\Roaming\SQL Developer\system<sqldevbuild>


So if you are still using 4.0.3.16.84, you could try upgrading to the latest 4.1.1.19.59 and just skip the settings migration step to see if the problem still exists.

reckless

Ok, I'll try it (btw the issue persist on 4.1.1.19.59).

Thinking about it, this are the only two "special" things installed:

- plugins: show me the password, keepalive

- a large set of connections imported via xml.

What is strange, is that on sqldeveloper version on linux the issue does not occur (with the same version, plugins and connections).

I'll post feedback about a fresh sqldeveloper install.

Thanks in advance.

reckless

Hi again,

Sorry for keep this thread alive but... same issue on 4.1.2.20 (with settings skipped on the 1st start)

Am I the only one? I can't understand what could cause this. Anyway I think the cause is clear:

SEVERE35230oracle.dbtools.raptor.backgroundTask.RaptorTaskManager$1null en java.util.StringTokenizer.nextToken(StringTokenizer.java:349)

Any chance to send this error to a java developer to see if this could be a bug on the sqldeveloper code? Any hint? I opened a SR a while ago a nothing was detected.

Take note that I tested it in various hw environments  (all on Windows 7 64bit).

Thanks in advance!

user6545024

I don't know why, but the problem I was having long time ago with this issue has dissapeared with the next line in sqldeveloper.conf:

AddVMOption -Duser.language=en

It forces SQL Developer to use English GUI, instead of the one I was using (Spanish)

reckless

Setting the english option did the trick!!! thanks a lot user6545024!!!

maybe could be useful send this workaround to developers team ....

user6545024

Gary, what do you think about sending this to developers? I suppose they can reproduce this behaviour using a non English GUI

Gary Graham-Oracle

Any chance to send this error (SEVERE ... RaptorTaskManager$1) to a java developer to see if this could be a bug on the sqldeveloper code?

As far as I know, the SEVERE log messages generated from RaptorTaskManager come either from cancelling an active task or scheduler thread, closing the window of an active task, or represent some otherwise uncaught exception in a background thread the task manager is running. So these messages do not help much to track down something that is typically a suspected issue with video driver software / hardware acceleration settings, or Java's handling of the user's locale.

Over the years, since English is the de facto locale, the AddVMOption -Duser.language=en workaround has been a standard recommendation when the user's locale is unsupported or some Java / locale bug comes up.  For example, in ...\sqldeveloper\ide\bin\ide.boot, we see other officially supported languages in the line...

oracle.translated.locales = de,es,fr,it,ja,ko,pt_BR,zh_CN,zh_TW

One never knows what problem a failure in a translated locale will cause SQL Developer.  For example, this old discussion re: a missing Connections navigator...

The Connection Navigator is missing

Gary Graham-Oracle

I suppose they can reproduce this behaviour using a non English GUI

Possibly. But I suppose the issue could also be the specific locale configuration on a specific machine and might be difficult to reproduce.  I have no idea what percentage of non-English locale users have this kind of problem, but if you have have solid test case it would be best to log a service request with Oracle Support.

1 - 16
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Feb 24 2016
Added on Jan 27 2016
0 comments
1,051 views