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 108075 - Unable to deploy Identity Sample EAR project
Summary: Unable to deploy Identity Sample EAR project
Status: VERIFIED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Identity (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Peter Liu
URL:
Keywords:
: 108438 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-06-25 21:19 UTC by tonybeckham
Modified: 2007-08-24 16:47 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
StockService EAR Sample Project (176.49 KB, application/octet-stream)
2007-06-25 21:20 UTC, tonybeckham
Details
server log error (3.18 KB, application/octet-stream)
2007-06-25 21:21 UTC, tonybeckham
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tonybeckham 2007-06-25 21:19:34 UTC
Problem:
Unable to deploy StockService Sample project.


System info:
Product Version: NetBeans IDE 6.0 Milestone 10 (build 200706242201)
Java: 1.5.0_07; Java HotSpot(TM) Client VM 1.5.0_07-87

But also confirmed on:
Linux + java 1.6.0_01
Windows + java 1.6.0_01

Steps:
-Install M10
-start appserver
-try and edit an Access Manager Profile and get usual error
-restart appserver
-verify you can edit a security profile
-Create new project ->samples->identity blueprints->StockService
-resolve missing references
-select undeploy and deploy
-Get error

Workaround:
restart the IDE
Comment 1 tonybeckham 2007-06-25 21:20:11 UTC
Created attachment 44367 [details]
StockService EAR Sample Project
Comment 2 tonybeckham 2007-06-25 21:21:19 UTC
Created attachment 44368 [details]
server log error
Comment 3 Peter Liu 2007-06-25 22:32:33 UTC
If you cannot reproduce the issue using the attached projects. Another way to reproduce it is to recreate the ear project
using the New Project wizard.  First, your IDE needs to include the SOA cluster which includes the Identity modules. 
In the IDE, bring up the New Project wizard and select Sample->Identity Blueprints->Stock Service to create the EAR
projects. You'll need to resolve a few missing references. Without restarting the IDE, deploy the EAR project and you
should see the error.

I am suspecting this is related to the MergedDDModel not being properly initialized. Please reassign to the proper
catagory if that is indeed the case.

Comment 4 Andrey Yamkovoy 2007-06-29 09:00:21 UTC
*** Issue 108438 has been marked as a duplicate of this issue. ***
Comment 5 Nitya Doraisamy 2007-08-03 03:10:58 UTC
needs to be assigned to owner of samples->identity blueprints->StockService
Tomas(tslota) might know the correct owner.
Comment 6 Tomas Mysik 2007-08-03 08:34:34 UTC
So reassigning to Tomasz.
Comment 7 Tomasz Slota 2007-08-03 09:29:30 UTC
Sorry, I have no idea what 'identity samples' are.
Comment 8 Peter Liu 2007-08-06 22:01:01 UTC
First, install the standard NB using the latest NB installer. Create the StockQuoteService sample by doing
New Project-> Samples -> Identity Blueprints -> StockService.  You will need to resolve a few missing module references.
Deploy the ear project and you will get the following error in the appserver log:

Deploying application in domain failed; Error loading deployment descriptors for module [StockQuoteService1] -- Invalid
ejb jar [StockQuoteService-ejb.jar]: it contains zero ejb. 
Note: 
1. A valid ejb jar requires at least one session, entity (1.x/2.x style), or message driven bean. 
2. EJB3+ entity beans (@Entity) are POJOs and please package them as library jar. 
3. If the jar file contains valid EJBs which are annotated with EJB component level annotations (@Stateless, @Stateful,
@MessageDriven), please check server.log to see whether the annotations were processed properly.
C:\Users\Peter Liu\Documents\NetBeansProjects\StockQuoteService1\StockQuoteService1\nbproject\build-impl.xml:183:
Deployment error:
Comment 9 Petr Blaha 2007-08-07 09:27:16 UTC
I think that the issue isn't in earproject itself since ejb module includes StockQuoteSessionBean bean with @Stateless
annotation. Also, deployment of ear file via web console works fine but the deployment from IDE and enabled directory
deployment doesn't work. Reassigning to serverplugins module for evaluation.

The deployment doesn't work when directory depl. is enabled.
Comment 10 Peter Liu 2007-08-13 22:50:55 UTC
Any progress on this issue?
Comment 11 Vince Kraemer 2007-08-13 23:29:44 UTC
no
Comment 12 Vince Kraemer 2007-08-14 00:32:04 UTC
what I have found so far...

Used the daily build from 200708131200 of NB 6.0...

1. the sample probably should not include a build-impl.xml and a build.xml in the project or its subprojects... Opening
the project doesn't regenerate these files, but they need to be regenerated for directory deployment to work.

2. I cannot get the sample to deploy to GF B58.. I see a ClassNotFoundException in the server log...

com.sun.enterprise.deployment.backend.IASDeploymentException: Error loading deployment descriptors for module
[StockQuoteService] -- null
        at com.sun.enterprise.deployment.backend.Deployer.loadDescriptors(Deployer.java:390)
        at com.sun.enterprise.deployment.backend.AppDeployerBase.loadDescriptors(AppDeployerBase.java:358)
        at com.sun.enterprise.deployment.backend.AppDeployer.explodeArchive(AppDeployer.java:294)
        at com.sun.enterprise.deployment.backend.AppDeployer.deploy(AppDeployer.java:207)
        at com.sun.enterprise.deployment.backend.AppDeployer.doRequestFinish(AppDeployer.java:148)
        at com.sun.enterprise.deployment.phasing.J2EECPhase.runPhase(J2EECPhase.java:191)
        at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:108)
        at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:919)
        at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:279)
        at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:788)
        at com.sun.enterprise.management.deploy.DeployThread.deploy(DeployThread.java:187)
        at com.sun.enterprise.management.deploy.DeployThread.run(DeployThread.java:223)
Caused by: java.lang.RuntimeException
        at
com.sun.enterprise.deployment.runtime.common.PrincipalNameDescriptor.getPrincipal(PrincipalNameDescriptor.java:85)
        at
com.sun.enterprise.deployment.node.runtime.application.ApplicationRuntimeNode.addDescriptor(ApplicationRuntimeNode.java:200)
        at com.sun.enterprise.deployment.node.DeploymentDescriptorNode.addNodeDescriptor(DeploymentDescriptorNode.java:195)
        at com.sun.enterprise.deployment.node.DeploymentDescriptorNode.endElement(DeploymentDescriptorNode.java:342)
        at com.sun.enterprise.deployment.node.SaxParserHandler.endElement(SaxParserHandler.java:453)
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:601)
        at com.sun.org.apache.xerces.internal.impl.dtd.XMLNSDTDValidator.endNamespaceScope(XMLNSDTDValidator.java:263)
        at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.handleEndElement(XMLDTDValidator.java:2028)
        at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.endElement(XMLDTDValidator.java:901)
        at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1772)
        at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2923)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:645)
        at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
        at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:508)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
        at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
        at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
        at com.sun.enterprise.deployment.io.DeploymentDescriptorFile.read(DeploymentDescriptorFile.java:298)
        at com.sun.enterprise.deployment.archivist.Archivist.readRuntimeDeploymentDescriptor(Archivist.java:527)
        at
com.sun.enterprise.deployment.archivist.ApplicationArchivist.readRuntimeDeploymentDescriptor(ApplicationArchivist.java:405)
        at com.sun.enterprise.deployment.backend.Deployer.loadDescriptors(Deployer.java:342)
        ... 11 more
Caused by: java.lang.ClassNotFoundException: com.sun.identity.wss.security.SecurityPrincipal
        at com.sun.enterprise.loader.EJBClassLoader.findClassData(EJBClassLoader.java:737)
        at com.sun.enterprise.loader.EJBClassLoader.findClass(EJBClassLoader.java:627)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:247)
        at
com.sun.enterprise.deployment.runtime.common.PrincipalNameDescriptor.getPrincipal(PrincipalNameDescriptor.java:78)
        ... 34 more

3. After I used the GF v2 updatetool to get the AM bits installed on the server, the CNFE was eliminated and the sample
service deployed as an archive.  I shutdown NetBeans and the AS, used find to delete the build-impl.xml and build.xml
files from the sample, restarted the IDE (this regenerated the build files...) and the AS and was able to do a
successful directory based deployment [after doing an undeploy of the archive based deployed service].

I really do not think the sample should include data that can be automatically regenerated... like the build-impl.xml
files for these projects.
Comment 13 Peter Liu 2007-08-14 01:10:56 UTC
Hi Vince,

Thanks for looking into this.  I'll try to see what happens if I don't include the build-impl.xml file.  


Comment 14 Peter Liu 2007-08-16 01:29:18 UTC
Removing the build-impl.xml did indeed help with this issue. The fix is checked into NB6 trunk.

Comment 15 Jaroslav Pospisil 2007-08-24 16:47:17 UTC
VERIFIED