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 204150 - JSF Pages from Entity Classes wizard generates application failing on WebLogic
Summary: JSF Pages from Entity Classes wizard generates application failing on WebLogic
Status: VERIFIED WORKSFORME
Alias: None
Product: javaee
Classification: Unclassified
Component: Persistence (show other bugs)
Version: 7.1
Hardware: PC Windows XP
: P3 normal (vote)
Assignee: Sergey Petrov
URL:
Keywords: RANDOM
Depends on:
Blocks:
 
Reported: 2011-10-24 10:14 UTC by Jiri Skrivanek
Modified: 2011-10-27 09:04 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Stack trace from server. (6.59 KB, text/plain)
2011-10-24 10:14 UTC, Jiri Skrivanek
Details
Stack trace with JPA 2.0 disabled. (1.98 KB, text/plain)
2011-10-26 07:06 UTC, Jiri Skrivanek
Details
Stack trace with JPA 2.0 enabled. (9.00 KB, text/plain)
2011-10-26 07:07 UTC, Jiri Skrivanek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Skrivanek 2011-10-24 10:14:19 UTC
Created attachment 112363 [details]
Stack trace from server.

Web application generated by JSF Pages from Entity Classes wizard is not running with WebLogic server. To reproduce:

- create web application with JSF framework and WebLogic 10.3.5 server
- create new "Persistence|Entity Classes from Database"
- create new "JavaServer Faces|JSF Pages from Entity Classes"
- run project
- application is started but if you click any link in index.xhtml page it fails with error

<openjpa-1.1.1-SNAPSHOT-r422266:965591 fatal user error> org.apache.openjpa.persistence.ArgumentException: A JDBC Driver or DataSource class name must be specified in the ConnectionDriverName property.

Product Version: NetBeans IDE Dev (Build 201110240600)
Java: 1.7.0; Java HotSpot(TM) Client VM 21.0-b17
System: Windows XP version 5.1 running on x86; Cp1250; en_US (nb)
Comment 1 Martin Fousek 2011-10-24 16:38:33 UTC
Jirka I'm afraid that there could happen hundreds of things since steps are not probably detailed enough for reproducing your troubles. It would require how were your dataSources created - configuration, which DB you used etc.

Quite probably it will be some weblogic configuration error, but I don't know weblogic much, at least I found this, so you can try if it will help to you:
https://forums.oracle.com/forums/thread.jspa?threadID=949034
Comment 2 Martin Fousek 2011-10-25 10:07:49 UTC
CCing also PetrH. Please don't you know if this error can happen due to our support? As I mentioned in my last comment I would expect badly configured dataSource in WL but Jirka told me that he was creating that DS thru the IDE.

BTW, Jirka ... please could you send more detailed steps to helps us detect where the issue could happen? Especially focus on step Nr.2. Thanks.
Comment 3 Sergey Petrov 2011-10-25 10:48:51 UTC
there is one more openjpa issue https://netbeans.org/bugzilla/show_bug.cgi?id=195674 on our side but is it necessary to use openjpa?
Comment 4 Sergey Petrov 2011-10-25 10:49:46 UTC
it may be also openjpa issue even I said above "on our side"
Comment 5 Jiri Skrivanek 2011-10-25 14:40:00 UTC
It seems similar like bug 195674. If I enable JPA 2.0 in WebLogic properties (EclipseLink is used in persistence unit then), it throws a different error. I expect that application created from templates should work with default values. Steps to create entity classes are as follows:

- open new file wizard
- choose "Persistence|Entity Classes from Database"
- select "sample" data source in combo box
- click "Add All"
- click Next
- provide arbitrary package name
- click Finish
Comment 6 Sergey Petrov 2011-10-25 20:32:48 UTC
later default may be changed and issues with nondefault openjpa may get less priority.
what's another issue with jpa2.0 on?
Comment 7 Martin Fousek 2011-10-26 05:26:38 UTC
Moving to the proper category. BTW, couldn't it be duplicate of issue #194787?

I also found really similar openjpa issue, but the is not clear if it was just closed (and it was setup error) or if there were really changes to sources:
https://issues.apache.org/jira/browse/OPENJPA-1495
But I would believe the status there that the issue had to be really fixed and it's openjpa-1 bug.
Comment 8 Sergey Petrov 2011-10-26 06:21:12 UTC
yes in 194787 initial issue wasn't reproducible and it was used to resolve some others but initial was the same as in this issue.
It may have sense to look at what way datasource was created, how it was created? May be this datasource wasn't deployed to weblogic properly.
Comment 9 Jiri Skrivanek 2011-10-26 07:05:58 UTC
I created brand new domain using WebLogic configuration wizard. Then in the "Entity Classes from Database" wizard I created a new data source from sample derby connection. It was deployed to WebLogic server when I run project.

- run project (JPA 2.0 disabled) - stackTrace.txt
- enable JPA 2.0 in server properties
- restart server
- run project - stackTraceJPA2.0.txt
- create new project with entity classes and JSF pages from EC
- run project - it works

So, is it an issue of WebLogic, openjpa or IDE?
Comment 10 Jiri Skrivanek 2011-10-26 07:06:50 UTC
Created attachment 112439 [details]
Stack trace with JPA 2.0 disabled.
Comment 11 Jiri Skrivanek 2011-10-26 07:07:11 UTC
Created attachment 112440 [details]
Stack trace with JPA 2.0 enabled.
Comment 12 Martin Fousek 2011-10-26 07:19:27 UTC
(In reply to comment #10)
> Created an attachment (id=112439) [details]
> Stack trace with JPA 2.0 disabled.

I'm afraid that this is not telling anything about this issue. Is it possible that you have timed out your session, refreshed old page, or not running properly server or app?
Comment 13 Sergey Petrov 2011-10-26 07:31:23 UTC
last one "Stack trace with JPA 2.0 disabled" is different from initial stacktrace, and looks like index page access issue and either index isn't valid or server is corrupted/broken etc.

with jpa2.0 on it's duplicate of issue "195674", org.apache.openjpa.persistence.PersistenceException: Neplatn� form�t �et�zce znak� pro typ int.
As I see. It seems jpa2.0 was enabled after application creation and it means openjpa is used instead of eclipselink or may be there is another issue.
Comment 14 Jiri Skrivanek 2011-10-26 07:32:56 UTC
I used Run project action and waited for new browser window to be opened.
Comment 15 Martin Fousek 2011-10-26 07:48:39 UTC
(In reply to comment #14)
> I used Run project action and waited for new browser window to be opened.

I'm afraid that this mustn't be save enough, especially if you had enabled DoS. GF could also tried to refresh/restore your session and wasn't successful.
Comment 16 Sergey Petrov 2011-10-26 11:23:23 UTC
just tested initial steps
I have fresh 10.3.5 installation with some default domain created at installation, all default.
CReate web project on this server instance(with registration in the wizard) and with jsf framework addition.
Create new entity from DISCOUNT_CODE, with "myds" datasource creation in the wizard from connection to derby db.
create jsf from this entity with all default in the same package.
invoke Run

page is deployed successfully, neither initially reported not last one with index page access issue is reproducible.
attempt to access @Show All DiscountCode Items@ produce error from issue 195674 and nothing else.

Am I miss something?
Comment 17 Jiri Skrivanek 2011-10-26 11:27:39 UTC
Your steps are exactly the same as mine. First time I got a different exception and lastly the same as in bug 195674.
Comment 18 Sergey Petrov 2011-10-26 11:36:55 UTC
Ok, first time there may be some deployment issue with first time datasource configuration during deployment, it may be good to localize it if there any way to reproduce, I just have no this issue even with first time so it at least random as you have no this issue second time. And it may be not a persistence issue instead of bug 195674.
Comment 19 Sergey Petrov 2011-10-27 09:02:49 UTC
isn't reproducible/anyway low priority even if rarely reproducible as eclipsleink/toplink support is preferred and can be easily selected either on sever side or changed in persistence.xml