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 214604 - Oracle Cloud Remote platform contains always JSF1.2 API classes
Summary: Oracle Cloud Remote platform contains always JSF1.2 API classes
Status: VERIFIED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: JSF (show other bugs)
Version: 7.2
Hardware: PC Linux
: P2 normal (vote)
Assignee: David Konecny
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-22 08:22 UTC by Martin Fousek
Modified: 2012-07-13 09:15 UTC (History)
9 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
just the optional null check (1.11 KB, patch)
2012-06-25 06:11 UTC, Martin Fousek
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Fousek 2012-06-22 08:22:09 UTC
Product Version: NetBeans IDE 7.2 RC1 (Build 201206192200)
Java: 1.6.0_26; Java HotSpot(TM) 64-Bit Server VM 20.1-b02
System: Linux version 3.0.0-20-generic running on amd64; UTF-8; en_US (nb)

Originally reproted by Arun Gupta. Thanks Arun for detecting that JSF troubles.

With the clean userdir do following steps:
1, create new web application with the Oracle Cloud as a server
2, on the last wizard page include JSF framework (in version 2.0 - as server library)
3, try to create i.e. JSF Managed Bean -> there is an error, that no faces-config.xml was created. Also you cannot annotate any class as @ManagedBean - no such class found on compilation classpath.

This JSF do because:
- project detects as javaEE5 BUT there isn't found on compilation classpath jsf2.0+ API

The problem lies between Oracle Cloud and JSF. I think that Oracle Cloud should not have one big bundle javaee5.jar (where are currently only JSF1.2 API classes). Instead of that there should exist alone JSF API bundles, but probably cloud.oracle module has no way to include such libraries into the project on the base of selected JSF library and version. So that's the place where could JSF help and in case of selected server library it should include into the project appropriate JSF API JAR.

I'm assigning to me but I would like to wait for David's objections for proposed solution since he will know better cloud module potentialities.

BTW, since there is a workaround to choose IDE registered library, I propose to fix this issue into the 7.2 patch1 - the fix could be quite big and risky for integration during code freeze phase. Your thoughts?
Comment 1 Martin Janicek 2012-06-22 09:49:38 UTC
Martin, do you think it can be related to the issue 211782 ?
Comment 2 Martin Fousek 2012-06-22 10:06:04 UTC
(In reply to comment #1)
> Martin, do you think it can be related to the issue 211782 ?

Yes, it's definitely. I didn't close #211782 as duplicate to have it tracked also for maven + weblogic projects. Most probably will be fixed at once and it can be closed anytime then.
Comment 3 David Konecny 2012-06-24 21:16:27 UTC
Wizard suggests that users install local Weblogic before registering Oracle Cloud. In such case classpath from local Weblogic is used and development environment, that is classpath, are very close to Oracle Cloud runtime.

If local Weblogic is not available, as in this test case, the classpath is build using standard java-ee-5 jar. The problem was that if user chose JSF2.0 in JSF framework wizard this choice was not reflected in the classpath which I'm fixing now. I'm also adding EclipseLink jars to classpath as they are needed for JPA2 as well.

39ed72417f32
Comment 4 Petr Hejl 2012-06-24 21:28:43 UTC
(In reply to comment #3)
> Wizard suggests that users install local Weblogic before registering Oracle
> Cloud. In such case classpath from local Weblogic is used and development
> environment, that is classpath, are very close to Oracle Cloud runtime.
> 
> If local Weblogic is not available, as in this test case, the classpath is
> build using standard java-ee-5 jar. The problem was that if user chose JSF2.0
> in JSF framework wizard this choice was not reflected in the classpath which
> I'm fixing now. I'm also adding EclipseLink jars to classpath as they are
> needed for JPA2 as well.
> 
> 39ed72417f32

Martin can you verify this? David do you think this is 7.2 stopper? In other words should this be escalated to P1 and fixed for 7.2 as well? Or is that high risk fix and/or low impact issue?
Comment 5 David Konecny 2012-06-24 22:27:58 UTC
Fix is safe I think. Martin, could you review as well please?

I'm undecided about whether this is show stopper or not. I would say it is not but on the other hand any user who will try the suggested scenario (which is very common I would say) will face this problem. In that sense any Oracle Cloud user trying to develop their JSF2 app might be impacted and it might be worth to fix this in 7.2 if there is a time still.
Comment 6 Martin Fousek 2012-06-25 06:11:06 UTC
Created attachment 121271 [details]
just the optional null check

(In reply to comment #5)
> Fix is safe I think. Martin, could you review as well please?

I would check the specVersion for null - see the patch. But it's really optional since you control libraries creation in the OracleOptionalDeploymentManagerFactory. So generally the patch looks OK to me.

BTW, I like proposed solution since it brings a very low risk in comparison with my suggested one. I verified it in the IDE and it works well.

> I'm undecided about whether this is show stopper or not. I would say it is not
> but on the other hand any user who will try the suggested scenario (which is
> very common I would say) will face this problem. In that sense any Oracle Cloud
> user trying to develop their JSF2 app might be impacted and it might be worth
> to fix this in 7.2 if there is a time still.

I wasn't sure too. But now it looks me like good candidate for 7.2 since:
- there is probably no workaround for JPA2?
- there exists workaround for JSF2 but everybody will likely use the default way of server library and therefore will be facing this issue
- David's solution looks really safe and effective
Comment 7 David Konecny 2012-06-25 07:58:56 UTC
(In reply to comment #6)
> - there is probably no workaround for JPA2?

Users can add EclipseLink jars to project classpath to workaround it.
Comment 8 Martin Fousek 2012-06-25 08:05:16 UTC
(In reply to comment #7)
> (In reply to comment #6)
> > - there is probably no workaround for JPA2?
> 
> Users can add EclipseLink jars to project classpath to workaround it.

Right, outside the wizard it is a way.
Comment 9 David Konecny 2012-06-25 21:33:24 UTC
Jirka could you verify as well please? Thanks.
Comment 10 David Konecny 2012-06-25 22:41:19 UTC
(In reply to comment #6)
> I would check the specVersion for null - see the patch. But it's really
> optional since you control libraries creation in the
> OracleOptionalDeploymentManagerFactory. So generally the patch looks OK to me.

I added the check for specVersion. It is possible that user can have in their weblogic.xml records without spec version. Thanks.
d70de24bf675
Comment 11 Quality Engineering 2012-06-26 04:57:35 UTC
Integrated into 'main-golden', will be available in build *201206260002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/39ed72417f32
User: David Konecny <dkonecny@netbeans.org>
Log: #214604 - Oracle Cloud Remote platform contains always JSF1.2 API classes
Comment 12 Jiri Skrivanek 2012-06-26 07:54:44 UTC
Verified in dev build 201206260002.
Comment 13 David Konecny 2012-06-26 21:35:41 UTC
changeset:   232296:443db643f6bb
branch:      release72
user:        David Konecny <dkonecny@netbeans.org>
date:        Mon Jun 25 08:50:33 2012 +1200
files:       cloud.oracle/src/org/netbeans/modules/cloud/oracle/serverplugin/OracleJ2eePlatformImpl2.java
description:
#214604 - Oracle Cloud Remote platform contains always JSF1.2 API classes
(transplanted from 39ed72417f322d28620daafbb17004fae344ecdb)


changeset:   232297:42f055036a8e
branch:      release72
tag:         tip
user:        David Konecny <dkonecny@netbeans.org>
date:        Tue Jun 26 10:39:52 2012 +1200
files:       cloud.oracle/src/org/netbeans/modules/cloud/oracle/serverplugin/OracleJ2eePlatformImpl2.java
description:
#214604 - Oracle Cloud Remote platform contains always JSF1.2 API classes
(transplanted from d70de24bf67547e719b531cb5fad2cbcc163fbd3)
Comment 14 Quality Engineering 2012-06-27 05:02:58 UTC
Integrated into 'main-golden', will be available in build *201206270002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/d70de24bf675
User: David Konecny <dkonecny@netbeans.org>
Log: #214604 - Oracle Cloud Remote platform contains always JSF1.2 API classes
Comment 15 Quality Engineering 2012-06-28 05:09:06 UTC
Integrated into 'releases', will be available in build *201206272359* or newer. Wait for official and publicly available build.
Changeset: http://hg.netbeans.org/releases/rev/443db643f6bb
User: David Konecny <dkonecny@netbeans.org>
Log: #214604 - Oracle Cloud Remote platform contains always JSF1.2 API classes
(transplanted from 39ed72417f322d28620daafbb17004fae344ecdb)
Comment 16 Jiri Skrivanek 2012-07-13 09:15:48 UTC
Verified in NetBeans IDE 7.2 (Build 201207130001).