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.
Summary: | Commit glassfish samples from the trunk to NB 7.1.1 and NB 7.1 Patch 1 | ||
---|---|---|---|
Product: | javaee | Reporter: | bhaktimehta |
Component: | Samples | Assignee: | bhaktimehta |
Status: | VERIFIED FIXED | ||
Severity: | normal | CC: | jskrivanek, mjanicek, mmirilovic, pjiricka |
Priority: | P3 | ||
Version: | 7.1 | ||
Hardware: | PC | ||
OS: | Mac OS X | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: |
Project view scree shot.
embedded-glassfish build log. embedded-glassfish run log. |
Description
bhaktimehta
2012-01-13 23:07:51 UTC
There are 3 samples which are added in javaee There are 3 samples which are currently checked in Samples->Javaee ApplicationScopedResources EmbeddedGlassfish EjbContainer ApplicationScopedResources is an enterprise project EmbeddedGlassfish and EjbContainer are maven based projects What does each sample achieve? Use case? EmbeddedGlassfish A simple sample that shows Embedded API and demonstrates 1. Start/stop GlassFish Server 2. Deploy & Undeploy an application 3. Scattered Archive 4. Running asadmin commands from CommandRunner EjbContainer Demonstrates the use of Maven to test EJBs using the standalone EJB container support. ApplicationScopedResources A simple sample showing Application Scoped Resources in Glassfish. The samples are integrated in the netbeans web-main/j2ee.samples workspace. Note also I will change the layer.xml so that samples will be in Samples->Glassfish instead of Samples->Javaee as of now Patch looks good! I tested samples in the following environment and have a some comments/questions. Product Version: NetBeans IDE Dev (Build 201201160947) Java: 1.7.0_02; Java HotSpot(TM) Client VM 22.0-b10 System: Windows XP version 5.1 running on x86; Cp1250; en_US (nb) EmbeddedGlassfish EjbContainer What RESTful Web Services present in project are good for? ApplicationScopedResources There is a yellow badge icon on the project node (see screen shot). There is no hint in tooltip or error in underlying source files. What does it mean? AFAIK, application client project is somehow obsolete technology. Is it worth to demonstrate it in samples? EmbeddedGlassfish There are some exceptions when building embedded-glassfish project (see log file) and then http://localhost:9590/td is invalid. If I run project, the application works and in log there is only one exception (see log files). Created attachment 114968 [details]
Project view scree shot.
Created attachment 114969 [details]
embedded-glassfish build log.
Created attachment 114970 [details]
embedded-glassfish run log.
Jiri thanks for your detailed feedback. Regarding coment 7 I noticed that is happening when using Glassfish 3.1.1. Once we upgrade to 3.1.2 this message will not show. We are planning to change the references to 3.1.2 once it is shipped next month I forgot to say that I installed GlassFish 3.1.2-b17, registered it in IDE and used it with samples. Jiri, Thanks a lot for your detailed feedback. Here are some comments For EjbContainer and EmbeddedGlassfish the way to use 3.1.2 is to change in the pom.xml the groupId has changed to "org.glassfish.main.extras" and artifactId is glassfish-embedded-all and the version 3.1.2-SNAPSHOT Then you will see that 3.1.2 embedded glassfish is being used and you will not see the error related to java.lang.NoClassDefFoundError: org/osgi/framework/ServiceException The error is showing up as we are using version 3.1.1 of glassfish which is already released. Once 3.1.2 is released we can modify the samples to use 3.1.2 and also blog about it. Regarding the Restful webservices shown in EjbContainer sample it is due to a dependency which glassfish-embedded-all has on admin-rest and hence they show up . Also I am not sure how to fix yellow badge icon on the ApplicationScopedResources sample. There is no hint given and I tried to look at IDE logs too. So I dont know how best to fix this. If you think we can file a bug against the ide for more information on why the badge is coming I can do so and provide the nb project for the sample as an attachment Please let me know if this patch is approved for transplant . Thanks, Bhakti Thank you for your comments. 1) I tried the following and it works. <dependency> <groupId>org.glassfish.main.extras</groupId> <artifactId>glassfish-embedded-all</artifactId> <version>3.1.2-SNAPSHOT</version> </dependency> From my point of view it would be better to transplant these changes with final location of glassfish-embedded-all 3.1.2. It depends on timing of releasing of the 71 patch. If GlassFish 3.1.2 is already released in that time, we should build samples against it. Petr Jiricka is in charge to decide it. 2) I filed bug 207714 about warning icon. It is because data source defined in project is not found. I would recommend to change data source the following way because it is default connection in NetBeans: - <property name="Password" value="APP"></property> + <property name="Password" value="app"></property> - <property name="User" value="APP"></property> + <property name="User" value="app"></property> <property name="serverName" value="localhost"></property> - <property name="DatabaseName" value="nb-samples"></property> + <property name="DatabaseName" value="sample"></property> - <property name="connectionAttributes" value=";create=true"></property> 3) In build 201201230600 samples are still under Java EE category and not under GlassFish as you proposed in comment 2. Thanks Jiri for the quick response. I will start a thread with Petr, you , and Sathyan the 3.1.2 manager on how to align the samples with 3.1.2. I think when 3.1.2 is released NB may be in code freeze mode and may not accept my changes. So we have to start with 3.1.1 in samples now and then blog or update the samples later. But lets discuss this more. I will file a new bug to move the samples from Javaee to Glassfish and assign it to myself since I am running into commit-validation failures when I modify the layer.xml so I do not want this change to affect the migration of the samples, also this is not as high priority as getting the samples in first. I am following up with nb engineers also . I have made changes to the glassfish-resources.xml and will commit to the nb trunk tomorow so you can verify. Appreciate all your help Thanks again Regards, Bhakti Jiri, I have committed the patch to the nb trunk right now. I have modified the samples based on feedback from you and Petr Jirica. The glassfish-resources.xml has default values. Modified the pom.xml to specify 3.1.2 release in the EmbeddedGlassfish and EjbContainer samples so that once 3.1.2 is out these will start working (detail / hgweb) Please can you approve this transplant Thanks, Bhakti Verified in trunk build 201201280600. Integrated in release71_fixes so marking bug 71patch1-fixed and target milestone 7.1.1 |