This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 236510 - Exceptions when running CRUD REST application on TomEE server
Summary: Exceptions when running CRUD REST application on TomEE server
Status: RESOLVED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: TomEE (show other bugs)
Version: 8.0
Hardware: PC Mac OS X
: P2 normal (vote)
Assignee: Petr Hejl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-29 05:29 UTC by Petr Jiricka
Modified: 2013-10-04 12:13 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
TomEE output with exceptions (102.26 KB, text/plain)
2013-09-29 05:29 UTC, Petr Jiricka
Details
Project to reproduce (138.58 KB, application/zip)
2013-09-29 05:32 UTC, Petr Jiricka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Jiricka 2013-09-29 05:29:39 UTC
Created attachment 140613 [details]
TomEE output with exceptions

1. Download and register the "TomEE JAX-RS 1.5.2" server from tomee.apache.org
2. Open the attached project (or, you can also created it by using Entity from DB and REST from Entity wizards from the sample database).
3. Run this app on TomEE
4. Open URL http://localhost:8080/HelloTomEE/webresources/com.mycompany.hellotomee.customer

=> Exceptions in the attachment are thrown in output.
Comment 1 Petr Jiricka 2013-09-29 05:32:26 UTC
Created attachment 140614 [details]
Project to reproduce
Comment 2 Sergey Petrov 2013-09-29 06:39:23 UTC
Is tomee supported server?
Comment 3 Sergey Petrov 2013-09-29 06:43:49 UTC
It's runtime exception, and it's nice if someone will provide a way to fix it on tomee side in my opinion, this way it may be possible to adjust nb generators to generate code suitable for tomee.
Comment 5 Petr Jiricka 2013-09-29 15:51:57 UTC
Ok, I thought that our Tomcat/TomEE plugin does support datasource definition and deployment, no? Should not NetBeans configure this automatically for the user? Petr?
Comment 6 Petr Hejl 2013-09-30 08:45:55 UTC
(In reply to Petr Jiricka from comment #5)
> Ok, I thought that our Tomcat/TomEE plugin does support datasource
> definition and deployment, no? Should not NetBeans configure this
> automatically for the user? Petr?
Yes it should. Though it looks like there is difference in certain part of TomEE. Perhaps for DS to be used with JTA the tomee needs it to be defined either in tomee.xml or WEB-INF/resources.xml. I'll try to fix it and prefer resources.xml over context.xml on tomee.

BTW there might be another issue with generated classes and openjpa (I'm getting org.apache.openjpa.persistence.PersistenceException: Invalid character string format for type int.
FailedObject: com.mycompany.hellotomee.Customer-25). I'll file it later if this will be still reproducible after my fix.
Comment 7 Sergey Petrov 2013-09-30 10:06:28 UTC
move to server plugins as fix is related.
there is an issue with openjpa support https://netbeans.org/bugzilla/show_bug.cgi?id=195674 without tomee support it was low priority in my opinion, if tomee is added, it may be more important to fix.
Comment 8 Petr Hejl 2013-09-30 11:49:46 UTC
Support reading DS from resources.xml - web-main 4da25f13ab9e.
Comment 9 Petr Hejl 2013-10-01 13:49:26 UTC
Creation of datasources in resources.xml - web-main 571afba92eba. Needs more polishing.
Comment 10 Petr Hejl 2013-10-03 10:12:32 UTC
Fixed datasource references (actually a quite old unreported bug) and loading DS form tomee.xml. web-main b067d5f9005b
Comment 11 Quality Engineering 2013-10-04 01:32:38 UTC
Integrated into 'main-silver', will be available in build *201310040001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/b067d5f9005b
User: Petr Hejl <phejl@netbeans.org>
Log: #236510 - Exceptions when running CRUD REST application on TomEE server
Comment 12 Petr Hejl 2013-10-04 10:12:10 UTC
resources as root element in resources.xml, fixed tests - web-main a6943fdb3579.
Comment 13 Petr Hejl 2013-10-04 12:13:35 UTC
Ok should be fixed now - web-main ef1121833010.