<< Back to previous view

[MOCK_JAVAMAIL-12] Failed to build the project Created: 01/May/13  Updated: 03/May/13

Status: Open
Project: mock-javamail
Component/s: None
Affects Version/s: current
Fix Version/s: None

Type: Bug Priority: Major
Reporter: dapeng_hu Assignee: Unassigned
Resolution: Unresolved Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags: maven
Participants: dapeng_hu

 Description   

Failed to build the project.

$ mvn install
[WARNING] Some problems were encountered while building the effective model for org.jvnet.mock-javamail:mock-javamail:jar:1.12-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-idea-plugin is missing. @ line 71, column 15
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 64, column 15
[WARNING] 'reporting.plugins.plugin.version' for org.apache.maven.plugins:maven-javadoc-plugin is missing. @ line 114, column 15
[WARNING] 'reporting.plugins.plugin.version' for org.apache.maven.plugins:maven-jxr-plugin is missing. @ line 117, column 15
[WARNING] 'repositories.repository.layout' for java.net uses the unsupported value 'legacy', artifact resolution might fail. @ line 35, column 15
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building JavaMail mock objects 1.12-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.716s
[INFO] Finished at: Tue Apr 30 17:07:38 PDT 2013
[INFO] Final Memory: 5M/149M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project mock-javamail: Could not resolve dependencies for project org.jvnet.mock-javamail:mock-javamail:jar:1.12-SNAPSHOT: Failed to collect dependencies for [javax.mail:mail:jar:1.4 (compile), junit:junit:jar:3.8 (compile)]: Failed to read artifact descriptor for javax.mail:mail:jar:1.4: Could not transfer artifact javax.mail:mail:pom:1.4 from/to internal-glassfish-nexus (http://gf-maven.us.oracle.com/nexus/content/groups/internal-gf-nexus/): No connector available to access repository internal-glassfish-nexus (http://gf-maven.us.oracle.com/nexus/content/groups/internal-gf-nexus/) of type legacy using the available factories WagonRepositoryConnectorFactory -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:



 Comments   
Comment by dapeng_hu [ 03/May/13 01:17 AM ]

The maven config file settings.xml defines internal repository. After removing it, the project works fine.





[GLASSFISH-20679] After returned from setupSecurityContext(), should check whether CallerPrincipalCallback is handled Created: 03/Jul/13  Updated: 03/Jul/13

Status: Open
Project: glassfish
Component/s: jca
Affects Version/s: not determined
Fix Version/s: 4.1

Type: Bug Priority: Major
Reporter: dapeng_hu Assignee: dapeng_hu
Resolution: Unresolved Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags: jca
Participants: dapeng_hu

 Description   

According to the section 16.4.5.1 "Case A: Establishing a Single Principal as the Caller Identity" of JCA1.6 Spec, if a resource adapter intends to establish an authenticated caller identity, and the principal Set of the executionSubject contains exactly the one Principal, then the setupSecurityContext() do not has to use the container provided CallbackHandler to handle a CallerPrincipalCallback.

In this case, the container must check whether or not it handled the CallerPrincipalCallback after returned from setupSecurityContext(). If it determines that it did not handle any Callbacks, the container must transform the contents of the executionSubject, as if they are handled through the Callbacks on behalf of the resource adapter.

But according to the method setupSecurityWorkContext (as below) of the class WorkContextHandlerImpl, GlassFish does not support the Case A. If setupSecurityContext() do not call CallbackHandler, GlassFish will ignore the content of executionSubject and setup up an unauthenticated identity for Work instance.

private void setupSecurityWorkContext(SecurityContext securityWorkContext,
WorkContextLifecycleListener listener, String raName)
throws WorkCompletedException{
try { Subject executionSubject = new Subject(); Subject serviceSubject = new Subject(); Map securityMap = getWorkContextMap(raName); CallbackHandler handler = new ConnectorCallbackHandler(executionSubject, runtime.getCallbackHandler(), securityMap); securityWorkContext.setupSecurityContext(handler, executionSubject, serviceSubject); // Need check whether the CallbackHandler is called or not here for Case A. notifyContextSetupComplete(listener); } catch (Exception e) { ... ... }
}






[GLASSFISH-20308] Unable to Deploy JAX-RS Restful Application Class Not Found JsonStructureBodyReader Created: 14/Apr/13  Updated: 03/May/13  Resolved: 03/May/13

Status: Resolved
Project: glassfish
Component/s: json
Affects Version/s: 4.0_b84_RC1
Fix Version/s: 4.0_b88_RC4, 4.0

Type: Bug Priority: Major
Reporter: peter_pilgrim Assignee: Michal Gajdos
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Embedded Container


Tags: 4_0-approved
Participants: buddypine, dapeng_hu, jitu, Michal Gajdos, peter_pilgrim and Tom Mueller

 Description   

This should not be happening in the GlassFish

Surely application code does not need to refer or import an internal Glassfish class:

org/glassfish/json/jaxrs/JsonStructureBodyReader

Apr 14, 2013 1:58:11 PM org.glassfish.jersey.servlet.init.JerseyServletContainerInitializer addServletWithDefaultConfiguration
INFO: Registering the Jersey servlet application, named javax.ws.rs.core.Application, with the following root resource and provider classes: [class je7hb.jaxrs.basic.RestfulBookService]
Apr 14, 2013 1:58:11 PM org.glassfish.jersey.server.ApplicationHandler initialize
INFO: Initiating Jersey application, version Jersey: 2.0-rc1 2013-03-26 02:00:32...
Apr 14, 2013 1:58:11 PM org.apache.catalina.core.StandardContext log
SEVERE: WebModule[/mywebapp]StandardWrapper.Throwable
java.lang.NoClassDefFoundError: org/glassfish/json/jaxrs/JsonStructureBodyReader
at org.glassfish.jersey.jsonp.JsonProcessingFeature.configure(JsonProcessingFeature.java:66)
at org.glassfish.jersey.model.internal.CommonConfig.configureFeatures(CommonConfig.java:617)
at org.glassfish.jersey.model.internal.CommonConfig.configureMetaProviders(CommonConfig.java:558)
at org.glassfish.jersey.server.ResourceConfig.configureMetaProviders(ResourceConfig.java:768)
at org.glassfish.jersey.server.ApplicationHandler.initialize(ApplicationHandler.java:313)
at org.glassfish.jersey.server.ApplicationHandler.access$500(ApplicationHandler.java:146)
at org.glassfish.jersey.server.ApplicationHandler$3.run(ApplicationHandler.java:269)
at org.glassfish.jersey.internal.Errors$2.call(Errors.java:249)
at org.glassfish.jersey.internal.Errors$2.call(Errors.java:246)
at org.glassfish.jersey.internal.Errors.process(Errors.java:275)
at org.glassfish.jersey.internal.Errors.process(Errors.java:257)
at org.glassfish.jersey.internal.Errors.processWithException(Errors.java:246)
at org.glassfish.jersey.server.ApplicationHandler.<init>(ApplicationHandler.java:266)
at org.glassfish.jersey.servlet.WebComponent.<init>(WebComponent.java:256)
at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:167)
at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:349)
at javax.servlet.GenericServlet.init(GenericServlet.java:244)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1583)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1382)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5670)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:5912)
at com.sun.enterprise.web.WebModule.start(WebModule.java:691)
at org.apache.catalina.core.ContainerBase.addChildInternal(Containeava:1041)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:1024)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:747)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2278)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1924)
at com.sun.enterprise.web.WebApplication.start(WebApplication.java:139)
at org.glassfish.internal.data.EngineRef.start(EngineRef.java:122)
at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:291)
at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:352)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:497)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:527)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:523)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:356)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:522)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:546)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1423)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1500(CommandRunnerImpl.java:108)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1762)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1674)
at com.sun.enterprise.admin.cli.embeddable.DeployerImpl.deploy(DeployerImpl.java:133)
at je7hb.common.webcontainer.embedded.glassfish.AbstractEmbeddedRunner.deployWithRename(AbstractEmbeddedRunner.java:86)
at je7hb.common.webcontainer.embedded.glassfish.SimpleEmbeddedRunner.launchDeployWarFileAndWait(SimpleEmbeddedRun ner.java:36)
at je7hb.common.webcontainer.embedded.glassfish.SimpleEmbeddedRunner.launchDeployWarFileAndWait(SimpleEmbeddedRunner.java:31)
at je7hb.jaxrs.basic.EmbeddedRunner.main(EmbeddedRunner.java:7)

Apr 14, 2013 1:58:11 PM org.apache.catalina.core.StandardContext log
SEVERE: WebModule[/mywebapp]Servlet /mywebapp threw load() exception
java.lang.NoClassDefFoundError: org/glassfish/json/jaxrs/JsonStructureBodyReader
at org.glassfish.jersey.jsonp.JsonProcessingFeature.configure(JsonProcessingFeature.java:66)
at org.glassfish.jersey.model.internal.CommonConfig.configureFeatures(CommonConfig.java:617)
at org.glassfish.jersey.model.internal.CommonConfig.configureMetaProviders(CommonConfig.java:558)
at org.glassfish.jersey.server.ResourceConfig.configureMetaProviders(ResourceConfig.java:768)
at org.glassfish.jersey.server.ApplicationHandler.initialize(ApplicationHandler.java:313)
at org.glassfish.jersey.server.ApplicationHandler.access$500(ApplicationHandler.java:146)
at org.glassfish.jersey.server.ApplicationHandler$3.run(ApplicationHandler.java:269)
at org.glassfish.jersey.internal.Errors$2.call(Errors.java:249)
at org.glassfish.jersey.internal.Errors$2.call(Errors.java:246)
at org.glassfish.jersey.internal.Errors.process(Errors.java:275)
at org.glassfish.jersey.internal.Errors.process(Errors.java:257)
at org.glassfish.jersey.internal.Errors.processWithException(Errors.java:246)
at org.glassfish.jersey.server.ApplicationHandler.<init>(ApplicationHandler.java:266)
at org.glassfish.jersey.servlet.WebComponent.<init>(WebComponent.java:256)
at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:167)
at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:349)
at javax.servlet.GenericServlet.init(GenericServlet.java:244)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1583)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1382)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext670)a:5
at org.apache.catalina.core.StandardContext.start(StandardContext.java:5912)
at com.sun.enterprise.web.WebModule.start(WebModule.java:691)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:1041)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:1024)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:747)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2278)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1924)
at com.sun.enterprise.web.WebApplication.start(WebApplication.java:139)
at org.glassfish.internal.data.EngineRef.start(EngineRef.java:122)
at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:291)
at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:352)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:497)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:527)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:523)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:356)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:522)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:546)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1423)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1500(CommandRunnerImpl.java:108)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1762)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1674)
at com.sun.enterprise.admin.cli.embeddable.DeployerImpl.deploy(DeployerImpl.java:133)
at je7on.webcontainer.embedded.glassfish.AbstractEmbeddedRunner.deployWithRename(AbstractEmbeddedRunner.java:86)
at je7hb.common.webcontainer.embedded.glassfish.SimpleEmbeddedRunner.launchDeployWarFileAndWait(SimpleEmbeddedRunner.java:36)
at je7hb.common.webcontainer.embedded.glassfish.SimpleEmbeddedRunner.launchDeployWarFileAndWait(SimpleEmbeddedRunner.java:31)
at je7hb.jaxrs.basic.EmbeddedRunner.main(EmbeddedRunner.java:7)

Apr 14, 2013 1:58:11 PM org.apache.catalina.core.StandardContext start
SEVERE: Startup of context /mywebapp failed due to previous errors
Apr 14, 2013 1:58:11 PM org.apache.catalina.core.ContainerBase addChildInternal
SEVERE: ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: org.apache.catalina.LifecycleException: java.lang.NoClassDefFoundError: org/glassfish/json/jaxrs/JsonStructureBodyReader
at org.apache.catalina.core.StandardContext.start(StandardContext.java:5920)
at com.sun.enterprise.web.WebModule.start(WebModule.java:691)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:1041)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:1024)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:747)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2278)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1924)
at com.sun.enterprise.web.WebApplication.start(WebApplication.java:139)
at org.glassfish.internal.data.EngineRef.start(EngineRef.java:122)
at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:291)
at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:352)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:497)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:527)
at com.sun.enterpridmin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:523)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:356)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:522)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:546)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1423)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1500(CommandRunnerImpl.java:108)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1762)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1674)
at com.sun.enterprise.admin.cli.embeddable.DeployerImpl.deploy(DeployerImpl.java:133)
at je7hb.common.webcontainer.embedded.glassfish.AbstractEmbeddedRunner.deployWithRename(AbstractEmbeddedRunner.java:86)
at je7hb.common.webcontainer.embedded.glassfish.SimpleEmbeddedRunner.launchDeployWarFileAndWait(SimpleEmbeddedRunner.java:36)
at je7hb.common.webcontainer.embedded.glassfish.SimpleEmbeddedRunner.launchDeployWarFileAndWait(SimpleEmbeddedRunner.java:31)
at je7hb.jaxrs.basic.EmbeddedRunner.main(EmbeddedRunner.java:7)
Caused by: org.apache.catalina.LifecycleException: java.lang.NoClassDefFoundError: org/glassfish/json/jaxrs/JsonStructureBodyReader
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5678)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:5912)
... 28 more
Caused by: java.lang.NoClassDefFoundError: org/glassfish/json/jaxrs/JsonStructureBodyReader
at org.glassfish.jersey.jsonp.JsonProcessingFeature.configure(JsonProcessingFeature.java:66)
at org.glassfish.jersey.model.internal.CommonConfig.configureFeatures(CommonConfig.java:617)
at org.glassfish.jersey.model.internal.CommonConfig.configureMetaProviders(CommonConfig.java:558)
at org.glassfish.jersey.server.ResourceConfig.configureMetaProviders(ResourceConfig.j)va:768
at org.glassfish.jersey.server.ApplicationHandler.initialize(ApplicationHandler.java:313)
at org.glassfish.jersey.server.ApplicationHandler.access$500(ApplicationHandler.java:146)
at org.glassfish.jersey.server.ApplicationHandler$3.run(ApplicationHandler.java:269)
at org.glassfish.jersey.internal.Errors$2.call(Errors.java:249)
at org.glassfish.jersey.internal.Errors$2.call(Errors.java:246)
at org.glassfish.jersey.internal.Errors.process(Errors.java:275)
at org.glassfish.jersey.internal.Errors.process(Errors.java:257)
at org.glassfish.jersey.internal.Errors.processWithException(Errors.java:246)
at org.glassfish.jersey.server.ApplicationHandler.<init>(ApplicationHandler.java:266)
at org.glassfish.jersey.servlet.WebComponent.<init>(WebComponent.java:256)
at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:167)
at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:349)
at javax.servlet.GenericServlet.init(GenericServlet.java:244)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1583)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1382)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5670)
... 29 more

Apr 14, 2013 1:58:11 PM com.sun.enterprise.web.WebApplication start
WARNING: java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: org.apache.catalina.LifecycleException: java.lang.NoClassDefFoundError: org/glassfish/json/jaxrs/JsonStructureBodyReader
java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: org.apache.catalina.LifecycleException: java.lang.NoClassDefFoundError: org/glassfish/json/jaxrs/JsonStructureBodyReader
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:1044)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:1024)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:747)
at com.sun.enteweb.WebContainer.loadWebModule(WebContainer.java:2278)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1924)
at com.sun.enterprise.web.WebApplication.start(WebApplication.java:139)
at org.glassfish.internal.data.EngineRef.start(EngineRef.java:122)
at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:291)
at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:352)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:497)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:527)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:523)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:356)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:522)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:546)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1423)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1500(CommandRunnerImpl.java:108)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1762)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1674)
at com.sun.enterprise.admin.cli.embeddable.DeployerImpl.deploy(DeployerImpl.java:133)
at je7hb.common.webcontainer.embedded.glassfish.AbstractEmbeddedRunner.deployWithRename(AbstractEmbeddedRunner.java:86)
at je7hb.common.webcontainer.embedded.glassfish.SimpleEmbeddedRunner.launchDeployWarFileAndWait(SimpleEmbeddedRunner.java:36)
at je7hb.common.webcontainer.embedded.glassfish.SimpleEmbeddedRunner.launchDeployWarFileAndWait(SimpleEmbeddedRunner.java:31)
at je7hb.jaxrs.basic.EmbeddedRunner.beddedRunner.java:7)

Apr 14, 2013 1:58:11 PM org.glassfish.internal.data.ModuleInfo start
SEVERE: Exception while invoking class com.sun.enterprise.web.WebApplication start method
java.lang.Exception: java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: org.apache.catalina.LifecycleException: java.lang.NoClassDefFoundError: org/glassfish/json/jaxrs/JsonStructureBodyReader
at com.sun.enterprise.web.WebApplication.start(WebApplication.java:168)
at org.glassfish.internal.data.EngineRef.start(EngineRef.java:122)
at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:291)
at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:352)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:497)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:527)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:523)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:356)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:522)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:546)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1423)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1500(CommandRunnerImpl.java:108)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1762)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1674)
at com.sun.enterprise.admin.cli.embeddable.DeployerImpl.deploy(DeployerImpl.java:133)
at je7hb.common.webcontainer.embedded.glassfish.AbstractEmbeddedRunner.deployWithRename(AbstractEmbeddedRunner.java:86)
je7hb.common.webcontainer.embedded.glassfish.SimpleEmbeddedRunner.launchDeployWarFileAndWait(SimpleEmbeddedRunner.java:36)
at je7hb.common.webcontainer.embedded.glassfish.SimpleEmbeddedRunner.launchDeployWarFileAndWait(SimpleEmbeddedRunner.java:31)
at je7hb.jaxrs.basic.EmbeddedRunner.main(EmbeddedRunner.java:7)

Apr 14, 2013 1:58:11 PM com.sun.enterprise.v3.server.ApplicationLifecycle deploy
SEVERE: Exception during lifecycle processing
java.lang.Exception: java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: org.apache.catalina.LifecycleException: java.lang.NoClassDefFoundError: org/glassfish/json/jaxrs/JsonStructureBodyReader
at com.sun.enterprise.web.WebApplication.start(WebApplication.java:168)
at org.glassfish.internal.data.EngineRef.start(EngineRef.java:122)
at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:291)
at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:352)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:497)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:527)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:523)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:356)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:522)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:546)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1423)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1500(CommandRunnerImpl.java:108)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1762)
at com.sun.enterprise.v3.admin.CommandRunnerImutionContext.execute(CommandRunnerImpl.java:1674)
at com.sun.enterprise.admin.cli.embeddable.DeployerImpl.deploy(DeployerImpl.java:133)
at je7hb.common.webcontainer.embedded.glassfish.AbstractEmbeddedRunner.deployWithRename(AbstractEmbeddedRunner.java:86)
at je7hb.common.webcontainer.embedded.glassfish.SimpleEmbeddedRunner.launchDeployWarFileAndWait(SimpleEmbeddedRunner.java:36)
at je7hb.common.webcontainer.embedded.glassfish.SimpleEmbeddedRunner.launchDeployWarFileAndWait(SimpleEmbeddedRunner.java:31)
at je7hb.jaxrs.basic.EmbeddedRunner.main(EmbeddedRunner.java:7)

Apr 14, 2013 1:58:11 PM org.glassfish.api.ActionReport failure
SEVERE: Exception while loading the app
Apr 14, 2013 1:58:11 PM com.sun.enterprise.web.WebContainer unloadWebModule
SEVERE: Undeployment failed for context /mywebapp
Apr 14, 2013 1:58:11 PM org.glassfish.deployment.admin.DeployCommand execute
SEVERE: Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: org.apache.catalina.LifecycleException: java.lang.NoClassDefFoundError: org/glassfish/json/jaxrs/JsonStructureBodyReader

        • Press the ENTER key to stop the server ****


 Comments   
Comment by Michal Gajdos [ 26/Apr/13 02:29 PM ]

Can you list modules under glassfish4\glassfish\modules? I am especially if you have jsonp-jaxrs.jar library.
How do you run your GF instance?

Comment by peter_pilgrim [ 26/Apr/13 02:49 PM ]

I am actually using the embedded GlassFish container in a Gradle build file and this is the environment where I found the JAX-RS failure.

Here is my Gradle build that specifies the dependencies that I use.

// build.gradle
apply plugin: 'java'
apply plugin: 'war'
apply plugin: 'maven'
apply plugin: 'eclipse'
apply plugin: 'idea'

// Define equivalent Maven GAV coordinates.
group = 'com.javaeehandbook.book1'
archivesBaseName = 'ch08-jaxrs-basic'
version = '1.0'

repositories {
maven { url 'https://maven.java.net/content/groups/promoted' }
maven { url 'http://repository.jboss.org/nexus/content/groups/public' }
mavenCentral()
mavenLocal()
}

dependencies { providedCompile 'org.glassfish.main.extras:glassfish-embedded-all:4.0-b84' providedCompile 'javax:javaee-api:7.0-b84' providedCompile 'javax:javaee-web-api:7.0-b84' providedCompile 'com.javaeehandbook.book1:glassfish-embedded-runner:1.0' compile 'org.glassfish.main.extras:glassfish-embedded-all:4.0-b84' compile 'javax:javaee-api:7.0-b84' compile 'com.javaeehandbook.book1:glassfish-embedded-runner:1.0' testCompile 'junit:junit:4.11' }

task wrapper(type: Wrapper) { gradleVersion = '1.5' }
//End

Maybe this jsonp-jaxrs is not being build into the embedded Glassfish 4.0 bundle or something along those lines?

Hope that helps.

Comment by Michal Gajdos [ 26/Apr/13 04:18 PM ]

The problem seems to be in embedded GF itself - it contains all Jersey libs as regular GF but does not contain JSON-P classes. I've sent a patch to Jitu.

Comment by jitu [ 26/Apr/13 08:49 PM ]

Here is the michael's patch.

---------------
Index: appserver/extras/embedded/web/pom.xml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
— appserver/extras/embedded/web/pom.xml (revision 61635)
+++ appserver/extras/embedded/web/pom.xml (revision )
@@ -3,7 +3,7 @@

DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.

  • Copyright (c) 1997-2012 Oracle and/or its affiliates. All rights reserved.
    + Copyright (c) 1997-2013 Oracle and/or its affiliates. All rights reserved.

The contents of this file are subject to the terms of either the GNU
General Public License Version 2 only ("GPL") or the Common Development
@@ -237,6 +237,13 @@
<dependency>
<groupId>org.glassfish.main.packager</groupId>
<artifactId>jersey</artifactId>
+ <version>${project.version}</version>
+ <type>zip</type>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>org.glassfish.main.packager</groupId>
+ <artifactId>json</artifactId>
<version>${project.version}</version>
<type>zip</type>
<optional>true</optional>
Index: appserver/extras/embedded/all/pom.xml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
— appserver/extras/embedded/all/pom.xml (revision 61635)
+++ appserver/extras/embedded/all/pom.xml (revision )
@@ -3,7 +3,7 @@

DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.

  • Copyright (c) 1997-2012 Oracle and/or its affiliates. All rights reserved.
    + Copyright (c) 1997-2013 Oracle and/or its affiliates. All rights reserved.

The contents of this file are subject to the terms of either the GNU
General Public License Version 2 only ("GPL") or the Common Development
@@ -277,6 +277,13 @@
<dependency>
<groupId>org.glassfish.main.packager</groupId>
<artifactId>jersey</artifactId>
+ <version>${project.version}</version>
+ <type>zip</type>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>org.glassfish.main.packager</groupId>
+ <artifactId>json</artifactId>
<version>${project.version}</version>
<type>zip</type>
<optional>true</optional>

Comment by dapeng_hu [ 27/Apr/13 02:26 AM ]

Move plugin version definition from connectors sub modules to top level pom.xml.

Comment by buddypine [ 02/May/13 03:40 AM ]

I'm still getting this issue in 4.0-b87 using glassfish-embedded in a Gradle build, the org.glassfish.json package does not seem to be present in the jar.

05:30:16.083 [DEBUG] [TestEventLogger] java.lang.NoClassDefFoundError: org/glassfish/json/jaxrs/JsonStructureBodyReader
05:30:16.083 [DEBUG] [TestEventLogger] at org.glassfish.jersey.jsonp.JsonProcessingFeature.configure(JsonProcessingFeature.java:66)
05:30:16.083 [DEBUG] [TestEventLogger] at org.glassfish.jersey.model.internal.CommonConfig.configureFeatures(CommonConfig.java:617)
05:30:16.084 [DEBUG] [TestEventLogger] at org.glassfish.jersey.model.internal.CommonConfig.configureMetaProviders(CommonConfig.java:558)
05:30:16.084 [DEBUG] [TestEventLogger] at org.glassfish.jersey.client.ClientConfig$State.initRuntime(ClientConfig.java:361)
05:30:16.084 [DEBUG] [TestEventLogger] at org.glassfish.jersey.client.ClientConfig$State.access$000(ClientConfig.java:84)
05:30:16.084 [DEBUG] [TestEventLogger] at org.glassfish.jersey.client.ClientConfig$State$3.get(ClientConfig.java:116)
05:30:16.085 [DEBUG] [TestEventLogger] at org.glassfish.jersey.client.ClientConfig$State$3.get(ClientConfig.java:113)
05:30:16.085 [DEBUG] [TestEventLogger] at org.glassfish.jersey.internal.util.collection.Values$LazyValue.get(Values.java:275)
05:30:16.085 [DEBUG] [TestEventLogger] at org.glassfish.jersey.client.ClientConfig.getRuntime(ClientConfig.java:667)
05:30:16.085 [DEBUG] [TestEventLogger] at org.glassfish.jersey.client.ClientRequest.getClientRuntime(ClientRequest.java:169)
05:30:16.085 [DEBUG] [TestEventLogger] at org.glassfish.jersey.client.JerseyInvocation.invoke(JerseyInvocation.java:629)
05:30:16.086 [DEBUG] [TestEventLogger] at org.glassfish.jersey.client.JerseyInvocation$Builder.method(JerseyInvocation.java:366)
05:30:16.086 [DEBUG] [TestEventLogger] at org.glassfish.jersey.client.JerseyInvocation$Builder.get(JerseyInvocation.java:270)

Comment by Michal Gajdos [ 03/May/13 09:16 AM ]

Reopening the issue as the patch was not applied and the issue was closed by mistake.

Comment by Michal Gajdos [ 03/May/13 09:29 AM ]
  • What is the impact on the customer of the bug?

Without the fix users won't be able to deploy a JAX-RS application into the embedded GF because jersey-media-json-processing requires javax.json, jsonp-jaxrs to be on the classpath (if these libraries are not present the mentioned exception would be raised).

  • What is the cost/risk of fixing the bug?

You can see the patch here [1] - adding json packager dependency to the embedded (all/web) modules.

[1] https://java.net/jira/browse/GLASSFISH-20308?focusedCommentId=362674&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_362674

  • Is there an impact on documentation or message strings?

No.

  • Which tests should QA (re)run to verify the fix did not destabilize GlassFish?

Deploy an JAX-RS application into an embedded GF instance + run all tests for Embedded GF.

  • Which is the targeted build of 4.0 for this fix?

88.

  • If this an integration of a new version of a component from another project,
    what are the changes that are being brought in? This might be list of
    Jira issues from that project or a list of revision messages.

N/A.

Comment by Tom Mueller [ 03/May/13 02:06 PM ]

Approved for 4.0. Please check the fix into the 4.0 branch and the trunk.





[GLASSFISH-20281] SDK 4.0 - Connector samples (mailconnector) fails to deploy Created: 11/Apr/13  Updated: 14/May/13  Resolved: 14/May/13

Status: Resolved
Project: glassfish
Component/s: sample_apps
Affects Version/s: 4.0_b83
Fix Version/s: 4.0_b89_RC5

Type: Bug Priority: Major
Reporter: Alex Pineda Assignee: dapeng_hu
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Installed java_ee_sdk-7-b83-unix.sh*, on OEL6 machine, using Maven version 3.0.5. Configured Maven environment as noted in http://aseng-wiki.us.oracle.com/asengwiki/display/GlassFish/BG+Development+Environment+Guide


Tags: 4_0-approved
Participants: Alex Pineda, dapeng_hu, michael.y.chen, shreedhar_ganapathy and Sivakumar Thyagarajan

 Description   

Following the "Building, Deploying, Running the Application" instructions that came with the Connector sample, one is not able to deploy the sample. The exact commands executed were:

1. [test@wolfrun] $ cd $WORKSPACE/glassfish4/samples/connectors
2. [test@wolfrun] $ mvn clean install
3. [test@wolfrun] $ mvn cargo:start -Dglassfish.home=$WORKSPACE/glassfish4

Step 1 and 2 work without problem. Please note that when executing "mvn install", the sample is built as follows
[INFO] ------------------------------------------------------------------------
[INFO] Building Mail Enterprise Application 4.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] — maven-enforcer-plugin:1.2:enforce (enforce-maven) @ mailconnector-ear —
[INFO]
[INFO] — maven-enforcer-plugin:1.2:enforce (enforce-versions) @ mailconnector-ear —
[INFO]
[INFO] — maven-ear-plugin:2.8:generate-application-xml (default-generate-application-xml) @ mailconnector-ear —
[INFO] Generating application.xml
[INFO]
[INFO] — maven-resources-plugin:2.4.3:resources (default-resources) @ mailconnector-ear —
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/agpineda/workspace/glassfish4/samples/connectors/mailconnector/mailconnector-ear/src/main/resources
[INFO]
[INFO] — maven-ear-plugin:2.8:ear (default-ear) @ mailconnector-ear —
[INFO] Copying artifact [ejb:org.glassfish-samples:mailconnector-mdb:4.0-SNAPSHOT] to [mailconnector-mdb.jar]
[INFO] Copying artifact [war:org.glassfish-samples:mailconnector-web:4.0-SNAPSHOT] to [mailconnector-web.war]
[INFO] Copying artifact [rar:org.glassfish-samples:mailconnector-ra:4.0-SNAPSHOT] to [mailconnector.rar]
[INFO] Copy ear sources to /home/agpineda/workspace/glassfish4/samples/connectors/mailconnector/mailconnector-ear/target/mailconnector-ear-4.0-SNAPSHOT
[INFO] Including custom manifest file [/home/agpineda/workspace/glassfish4/samples/connectors/mailconnector/mailconnector-ear/target/mailconnector-ear-4.0-SNAPSHOT/META-INF/MANIFEST.MF]
[INFO] Building jar: /home/agpineda/workspace/glassfish4/samples/connectors/mailconnector/mailconnector-ear/target/mailconnector-ear.ear
[INFO]
[INFO] — maven-install-plugin:2.3.1:install (default-install) @ mailconnector-ear —
[INFO] Installing /home/agpineda/workspace/glassfish4/samples/connectors/mailconnector/mailconnector-ear/target/mailconnector-ear.ear to /home/agpineda/.m2/repository/org/glassfish-samples/mailconnector-ear/4.0-SNAPSHOT/mailconnector-ear-4.0-SNAPSHOT.ear
[INFO] Installing /home/agpineda/workspace/glassfish4/samples/connectors/mailconnector/mailconnector-ear/pom.xml to /home/agpineda/.m2/repository/org/glassfish-samples/mailconnector-ear/4.0-SNAPSHOT/mailconnector-ear-4.0-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] mailconnector application ......................... SUCCESS [0.975s]
[INFO] MailConnector Resource Adapter .................... SUCCESS [2.695s]
[INFO] Mail MDB Reciever ................................. SUCCESS [1.261s]
[INFO] Mail Web Application .............................. SUCCESS [0.784s]
[INFO] Mail Enterprise Application ....................... SUCCESS [0.336s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.378s
[INFO] Finished at: Wed Apr 10 20:46:54 PDT 2013
[INFO] Final Memory: 28M/346M
[INFO] ------------------------------------------------------------------------

To deploy the sample, "mvn cargo:start -Dglassfish.home=$WORKSPACE/glassfish4" is executed and the following errors are seen
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for org.glassfish-samples:mailconnector-ra:rar:4.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-rar-plugin is missing. @ line 86, column 17
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-jar-plugin is missing. @ line 71, column 17
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] mailconnector application
[INFO] MailConnector Resource Adapter
[INFO] Mail MDB Reciever
[INFO] Mail Web Application
[INFO] Mail Enterprise Application
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building mailconnector application 4.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] — cargo-maven2-plugin:1.3.2:start (default-cli) @ mailconnector-app —
[INFO] [2.ContainerStartMojo] Resolved container artifact org.codehaus.cargo:cargo-core-container-glassfish:jar:1.3.2 for container glassfish3x
[INFO] [talledLocalContainer] Using port 4848 for Admin.
[INFO] [talledLocalContainer] Using port 8080 for HTTP Instance.
[INFO] [talledLocalContainer] Using port 7676 for JMS.
[INFO] [talledLocalContainer] Using port 3700 for IIOP.
[INFO] [talledLocalContainer] Using port 8181 for HTTP_SSL.
[INFO] [talledLocalContainer] Using port 3820 for IIOP_SSL.
[INFO] [talledLocalContainer] Using port 3920 for IIOP_MUTUALAUTH.
[INFO] [talledLocalContainer] Using port 8686 for JMX_ADMIN.
[INFO] [talledLocalContainer] Using port 6666 for OSGI_SHELL.
[INFO] [talledLocalContainer] Using port 9009 for JAVA_DEBUGGER.
[INFO] [talledLocalContainer] Distinguished Name of the self-signed X.509 Server Certificate is:
[INFO] [talledLocalContainer] [CN=wolfrun.us.oracle.com,OU=GlassFish,O=Oracle Corporation,L=Santa Clara,ST=California,C=US]
[INFO] [talledLocalContainer] Distinguished Name of the self-signed X.509 Server Certificate is:
[INFO] [talledLocalContainer] [CN=wolfrun.us.oracle.com-instance,OU=GlassFish,O=Oracle Corporation,L=Santa Clara,ST=California,C=US]
[INFO] [talledLocalContainer] Domain cargo-domain created.
[INFO] [talledLocalContainer] Domain cargo-domain admin port is 4848.
[INFO] [talledLocalContainer] Domain cargo-domain admin user is "admin".
[INFO] [talledLocalContainer] Command create-domain executed successfully.
[INFO] [talledLocalContainer] GlassFish 3.x starting...
[INFO] [talledLocalContainer] Waiting for cargo-domain to start .......
[INFO] [talledLocalContainer] Successfully started the domain : cargo-domain
[INFO] [talledLocalContainer] domain Location: /home/agpineda/workspace/glassfish4/glassfish/domains/cargo-domain
[INFO] [talledLocalContainer] Log File: /home/agpineda/workspace/glassfish4/glassfish/domains/cargo-domain/logs/server.log
[INFO] [talledLocalContainer] Admin Port: 4848
[INFO] [talledLocalContainer] Command start-domain executed successfully.
[INFO] [talledLocalContainer] Application deployed with name cargocpc.
[INFO] [talledLocalContainer] Command deploy executed successfully.
[INFO] [talledLocalContainer] GlassFish 3.x started on port [8080]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building MailConnector Resource Adapter 4.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] — cargo-maven2-plugin:1.3.2:start (default-cli) @ mailconnector-ra —
[INFO] [talledLocalContainer] Port for cargo-domain (4848) is in use. Try a different port number.
[INFO] [talledLocalContainer] CLI130: Could not create domain, cargo-domain
[INFO] [talledLocalContainer] Command create-domain failed.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] mailconnector application ......................... SUCCESS [32.192s]
[INFO] MailConnector Resource Adapter .................... FAILURE [1.596s]
[INFO] Mail MDB Reciever ................................. SKIPPED
[INFO] Mail Web Application .............................. SKIPPED
[INFO] Mail Enterprise Application ....................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 34.321s
[INFO] Finished at: Wed Apr 10 20:50:33 PDT 2013
[INFO] Final Memory: 8M/212M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.3.2:start (default-cli) on project mailconnector-ra: Execution default-cli of goal org.codehaus.cargo:cargo-maven2-plugin:1.3.2:start failed: Failed to create a GlassFish 3.x standalone configuration: GlassFish admin command failed: asadmin exited 1 -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :mailconnector-ra



 Comments   
Comment by shreedhar_ganapathy [ 19/Apr/13 05:14 PM ]

Hi Siva
Can you please take a look at this connector sample issue?
We need to resolve soon.

Comment by Sivakumar Thyagarajan [ 19/Apr/13 06:01 PM ]

I don't know why cargo tries to create the cargo-domain again during the deployment of the RAR. This appears to be the reason the maven invocation has failed. Requesting Dapeng to investigate.

Comment by dapeng_hu [ 24/Apr/13 03:29 AM ]

The mail connector project is an ear application which contains multiple sub modules: MDB, web and rar. In this case, the cargo goals should be executed in the mailconnector-ear module, instead of the parent module "mailconnector". This is a limitation of the cargo plugin.

As mentioned in the document of mailconnector "connectors/mailconnector/docs/index.html", this sample project should be built, deployed, undeployed in these steps:
1. $ cd $WORKSPACE/glassfish4/samples/connectors
2. $ mvn clean install
3. $ cd mailconnector/mailconnector-ear
4. $ mvn cargo:install
5. Add 3rd party library mock-javamail.jar in GlassFish. which is a dummy mail server. Without this library, the sample can be deployed, but do not work.
6. $ mvn cargo:start -Dglassfish.home=$WORKSPACE/glassfish4
7. $ mvn antrun:run # this goal will add some user accounts in GlassFish File realm.
8. $ mvn cargo:deployer-undeploy
9. $ mvn cargo:stop clean

Comment by Alex Pineda [ 24/Apr/13 04:33 AM ]

Thanks for the information on how to run the sample. Request that you transfer the information to the sample documentation (index.html file) and provide the details on the 3rd party library mock-javamail.jar and how to use it for running the sample.

However, I wonder why you want to call cargo:install. My understanding is this command will install a container distribution. I normally use "cargo: start" with "-Dglassfish.home=<GF Install Directory>" as to use the container (or server) that I install from the SDK distribution.

Comment by dapeng_hu [ 24/Apr/13 04:59 AM ]

[1] In the sample document, there is sections which introduce the mock javamail library, along with how to use it.

[2] Yes, the cargo:install only download the GF distribution to local host. But this sample project depends on 3rd library mock-javamail. This library should be added manually to the directory glassfish4/glassfish/lib/ before GlassFish is starting up. That is why we inset the step 5 above between cargo:install and cargo:start. Other sample projects do not have this kind of runtime dependency. So they can directly run the goal cargo:start.

Comment by dapeng_hu [ 24/Apr/13 05:05 AM ]

The assumption behind the my instruction is that: you use the cargo plugin to download and manage GlassFish distribution.

If you download and manage GlassFish by yourself, of cause you can skip the step 4 cargo:install and go the step 5.

Comment by Alex Pineda [ 24/Apr/13 05:09 AM ]

Not sure I made my point clear, but I think we're saying the same thing. As part of testing the sample, I plan to copy the mock library to the GlassFish lib directory, then invoke cargo:start. This command starts the server, creates a cargo-domain and deploys the sample. By using the -Dglassfish.home option, it will use my local GF installation. Afterwards run cargo: undeploy stop clean.

I'm assuming you have already added the instructions to the sample documentation. Just got the official (for QA) build 85 SDK builds. I will give look for the update in the index.html file.

Comment by Alex Pineda [ 24/Apr/13 05:17 AM ]

Which Glassfish distribution to use is a point of debate. As a QA person, I believe we should have the use use what they get through the SDK distribution. This is the reason why we're testing the product sa to make sure the SDK contents are useable and working. Some like you, want the user to get the latest from our open source repository. I understand why, but this is an option that is not tested daily or continuously. Again, we have a difference in opinion. Our PM has the final word on this option.

Comment by dapeng_hu [ 24/Apr/13 06:00 AM ]

In the pom.xml of top-most parent project, there is property as follows:
<cargo.maven.containerUrl>http://javaweb.us.oracle.com/java/re/glassfish/4.0/promoted/b85/archive/bundles/latest-glassfish.zip</cargo.maven.containerUrl>

This is where cargo plugin will download the GF distribution. So far, this URL address point to the latest GF available. And the value of this property is updated for each new build. But I guess it finally will be a stable version after GF4.0 is officially published.

Moreover, this property is shared by all sample projects, other sample project also use cargo to download and manage GF by default (not only me _). I guess this is because the sample projects can be shipped standalone (perhaps will be here: https://java.net/projects/glassfish-samples/downloads). If users only download the samples without GlassFish, this will save their time to install GlassFish and quickly start to play with the samples.

By the way, to suppress the warning message as you mentioned, I will add version for maven-rar-plugin and maven-jar-plugin in the pom.xml of mailconnector-rar module.

Comment by dapeng_hu [ 24/Apr/13 06:31 AM ]
  • What is the impact on the customer of the bug?
    In the pom.xml of sample project mailconnector-rar, the version number of plugin maven-rar-plugin and maven-jar-plugin are not specified.
    Maven will print out warning messages as follows when it loads the pom.xml.

[WARNING] Some problems were encountered while building the effective model for org.glassfish-samples:mailconnector-ra:rar:4.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-rar-plugin is missing. @ line 86, column 17
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-jar-plugin is missing. @ line 71, column 17

This problem has no impact on CTS, security, performance, etc.

  • What CTS failures are caused by this bug?
    None
  • What is the cost/risk of fixing the bug?
    None
  • How risky is the fix? How much work is the fix? Is the fix complicated?
    The fix is quite straightforward: add version number for plugin maven-rar-plugin and maven-jar-plugin in pom.xml.
  • Is there an impact on documentation or message strings?
    None
  • Which tests should QA (re)run to verify the fix did not destabilize GlassFish?
    None
  • Which is the targeted build of 4.0 for this fix?
    b86
  • If this an integration of a new version of a component from another project, what are the changes that are being brought in?
    None
Comment by dapeng_hu [ 28/Apr/13 02:16 AM ]

Move plugin version definition to top level pom.xml

Comment by Alex Pineda [ 01/May/13 12:09 AM ]

I went the instructions as noted in this report and what came with sample. The steps worked as mentioned and documented, however, when I tried to build the javamail mock library, I got a build error. The exact steps that I followed are:

o [test@wolfrun] $ cd $TEST/glassfish4/samples/connectors
o [test@wolfrun] $ svn checkout https://svn.java.net/svn/mock-javamail~svn/trunk/mock-javamail
Checked out revision 92.

o [test@wolfrun] cd mock-javamail
o [test@wolfrun] mvn clean
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------

o [test@wolfrun] $ mvn install
[WARNING] Some problems were encountered while building the effective model for org.jvnet.mock-javamail:mock-javamail:jar:1.12-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-idea-plugin is missing. @ line 71, column 15
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 64, column 15
[WARNING] 'reporting.plugins.plugin.version' for org.apache.maven.plugins:maven-javadoc-plugin is missing. @ line 114, column 15
[WARNING] 'reporting.plugins.plugin.version' for org.apache.maven.plugins:maven-jxr-plugin is missing. @ line 117, column 15
[WARNING] 'repositories.repository.layout' for java.net uses the unsupported value 'legacy', artifact resolution might fail. @ line 35, column 15
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building JavaMail mock objects 1.12-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.716s
[INFO] Finished at: Tue Apr 30 17:07:38 PDT 2013
[INFO] Final Memory: 5M/149M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project mock-javamail: Could not resolve dependencies for project org.jvnet.mock-javamail:mock-javamail:jar:1.12-SNAPSHOT: Failed to collect dependencies for [javax.mail:mail:jar:1.4 (compile), junit:junit:jar:3.8 (compile)]: Failed to read artifact descriptor for javax.mail:mail:jar:1.4: Could not transfer artifact javax.mail:mail:pom:1.4 from/to internal-glassfish-nexus (http://gf-maven.us.oracle.com/nexus/content/groups/internal-gf-nexus/): No connector available to access repository internal-glassfish-nexus (http://gf-maven.us.oracle.com/nexus/content/groups/internal-gf-nexus/) of type legacy using the available factories WagonRepositoryConnectorFactory -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

Comment by Alex Pineda [ 01/May/13 12:11 AM ]

Re-opening bug, although, I'm aware that this issue is not a product issue. Is more of missing instructions or configuration that is probably missing in the sample documentation.

Comment by dapeng_hu [ 01/May/13 11:18 AM ]

This is an issue of pom.xml of the project mock-javamail. The fix is as follows:

Index: pom.xml
===================================================================
— pom.xml (revision 92)
+++ pom.xml (working copy)
@@ -27,7 +27,7 @@
<archive>http://java.net/projects/mock-javamail/lists/users/archive</archive>
</mailingList>
</mailingLists>
-
+ <!--
<repositories>
<repository>
<id>java.net</id>
@@ -41,7 +41,7 @@
<layout>default</layout>
</repository>
</repositories>
-
+ -->
<distributionManagement>
<snapshotRepository>
<id>jvnet-nexus-snapshots</id>
@@ -86,7 +86,7 @@
</configuration>
</plugin>
</plugins>
-
+ <!--
<extensions>
<extension>
<groupId>org.jvnet.wagon-svn</groupId>
@@ -94,6 +94,7 @@
<version>1.6</version>
</extension>
</extensions>
+ -->
</build>

<dependencies>

I have created a new issue on JIRA to keep track of the issue: https://java.net/jira/browse/MOCK_JAVAMAIL-12

Comment by dapeng_hu [ 01/May/13 11:20 AM ]

The mock-javamial's issue will be tracked by another issue: https://java.net/jira/browse/MOCK_JAVAMAIL-12

Comment by michael.y.chen [ 01/May/13 01:36 PM ]

Does this mean the connector sample still fail to deploy / build?

The mock_javamail is a project no one is actively working on, I am pretty sure we won't get a fix for it in next week. We are 1 week from our last build, we either need to find another solution to work around the mock_javamail problem, remove usage of mock_javamail, or remove this connector sample. We can't ship the broken sample.

Comment by dapeng_hu [ 02/May/13 12:37 AM ]

That is an easy issue. I have found the fix for it. Please give me a chance to solve it.

Comment by dapeng_hu [ 03/May/13 01:00 AM ]

Because it involves a few tricks to build the mock-javamail project. The mock-javamail library is added in the connector sample project. So user and tester can directly deploy the library and do not have to download/build the mock-javamail project. The deployment instruction in the sample document has been updated too.

Comment by dapeng_hu [ 03/May/13 01:01 AM ]

Code change has been submitted.

Comment by Alex Pineda [ 14/May/13 12:37 AM ]

I was able to run the sample using the mock_javamail jar file that is now included in the SDK samples distribution. All the instructions work as documented, however, there's one small minor issue. The instructions says go to "samples_install_dir/javaee7/connectors", however, the correct directory is just "samples_install_dir/connectors". Would it possible to update the document in the next build. If it's too risky, then not a problem. I'm sure any intermediate or advance user will figure this out.

Re-opening the issue to see what can be done if anything.

Comment by Alex Pineda [ 14/May/13 12:38 AM ]

Request to see if the sample instructions can be updated to resolve an issue on the location of the sample. Not a major issue if the fix is too risky.

Comment by dapeng_hu [ 14/May/13 02:49 AM ]

Good catch, I am fixing it.

Comment by dapeng_hu [ 14/May/13 02:53 AM ]

The directory error in the sample document has been fixed.





[GLASSFISH-19347] Implement new methods on MessageEndpointFactory to support JMS 2.0 Created: 14/Nov/12  Updated: 28/Dec/12  Resolved: 28/Dec/12

Status: Resolved
Project: glassfish
Component/s: jca
Affects Version/s: 4.0
Fix Version/s: 4.0

Type: New Feature Priority: Major
Reporter: Nigel Deakin Assignee: dapeng_hu
Resolution: Fixed Votes: 1
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Dependency
depends on CONNECTOR_SPEC-1 New methods on MessageEndpointFactory... Resolved
blocks MQ-251 Implement JMSRA activation properties... Closed
Tags: jms-2-implementation
Participants: dapeng_hu, Ed Bratt, Nigel Deakin and prasads

 Description   

This is a request for the implementation (in the GlassFish connector runtime) of the new methods on MessageEndpointFactory to support JMS 2.0 which are proposed in CONNECTOR_SPEC-1.

Note that implementation of this feature is dependent on CONNECTOR_SPEC-1 being approved for JCA 1.7



 Comments   
Comment by prasads [ 27/Nov/12 08:27 AM ]

Assigning to Dapeng

Comment by dapeng_hu [ 12/Dec/12 06:46 AM ]

The new proposal for getEndpointUniqueName() and getInstanceName() are:

The name "getEndpointUniqueName" is changed to "getActivationUniqueName".

The method getInstanceName(): will be added in the BootstrapContext interface, instead of MessageEndpointFactory, since the instance name is static and stable for a server instance.

The value for instanceName in non-clustered setups be null, and for clustered setups be unique among every instance in the cluster. By making this change, we can have a RA also find out if it is operating in a cluster by checking for a non-null instanceName.

The final proposal is still under discussion.

Comment by dapeng_hu [ 18/Dec/12 05:41 AM ]

The final implementation is that:

1. add new method getActivationName() in MessageEndpointFactory interface which returns the unique name for the activation related to the MEF.
2. add new method getInstanceName() in BootstrapContext interface which returns the server instance name if it is a member of a cluster, or return null if it is a standalone server.

Comment by dapeng_hu [ 18/Dec/12 05:47 AM ]

Provides an implementation based on the proposal http://java.net/jira/browse/CONNECTOR_SPEC-1. If final connector MR choose different proposal, this issue should be re-opened.

Comment by Ed Bratt [ 18/Dec/12 07:59 PM ]

commit 57621 was reverted by RE.

Comment by dapeng_hu [ 20/Dec/12 08:35 AM ]

The method BootstrapContext.getInstanceName() is used during the activation of a message endpoint. It is only needed in server-side container. When RA is running in App client container, it don't need call the getInstanceName() method at all. So this method just return null while running in App client container.

Send out new code change for code review, and wait for comments.

Comment by dapeng_hu [ 28/Dec/12 09:07 AM ]

The implementation of getInstanceName and getActivationName has been submitted.





[GLASSFISH-19240] EE7: Connector Administered Object Definition Created: 25/Oct/12  Updated: 04/Jan/13  Resolved: 04/Jan/13

Status: Resolved
Project: glassfish
Component/s: jca
Affects Version/s: 4.0
Fix Version/s: 4.0

Type: New Feature Priority: Critical
Reporter: Tom Mueller Assignee: dapeng_hu
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags: ee7platspec
Participants: dapeng_hu, Jagadish and Tom Mueller

 Description   

This RFE is for implementing Java EE 7 section EE.5.19.8, "Connector Administered Object Definition" in GlassFish.



 Comments   
Comment by Jagadish [ 26/Oct/12 02:41 AM ]

Transferring to Dapeng who is implementing the feature.

Comment by dapeng_hu [ 12/Dec/12 06:03 AM ]

An administered object can be uniquely identified through the combination of the administered object interface and the administered object class. So a new attribute interfaceName will be added in the annotation @AdministeredObjectDefinition and a new element <interface-name> in deployment descriptor.

The new draft of connector MR completed internal discussion. It will be sent out to EG in a few days.

Comment by dapeng_hu [ 18/Dec/12 06:01 AM ]

Waiting Linda for updating the the schema in the master workspace.

Comment by dapeng_hu [ 21/Dec/12 10:03 AM ]

According to Linda's comments, change the attributes className and resourceAdapterName of @AdministerdObjectDefinition as mandatory.

Comment by dapeng_hu [ 04/Jan/13 08:25 AM ]

Submit code change based on the following definition of @AdministeredObjectDefinition. If EG has more requirements, this issue will be re-opened.

@Retention(RUNTIME)
@Target({TYPE})
public @interface AdministeredObjectDefinition {
String description() default "";
String name();
String interfaceName() default "";
String className();
String resourceAdapterName();
String[] properties() default {};
}





[GLASSFISH-19239] EE7: Connector or Custom Resource Definition Created: 25/Oct/12  Updated: 27/Feb/13  Resolved: 27/Feb/13

Status: Resolved
Project: glassfish
Component/s: jca
Affects Version/s: 4.0
Fix Version/s: 4.0_b76_EE7MS5

Type: New Feature Priority: Critical
Reporter: Tom Mueller Assignee: dapeng_hu
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags: ee7platspec
Participants: dapeng_hu, Jagadish, Sivakumar Thyagarajan and Tom Mueller

 Description   

This RFE is for implementing Java EE 7 section EE.5.19.7, "Connector or Custom Resource Definition" in GlassFish.



 Comments   
Comment by Jagadish [ 26/Oct/12 02:43 AM ]

Transferring the issue to Dapeng who is implementing the feature.
Note : Connector Resource is applicable here.
Custom Resource may not be applicable here. Discussions have started around custom resource sometime back.

Comment by dapeng_hu [ 12/Dec/12 06:08 AM ]

In the Connector MR, the annotation @ConnectorResourceDefinition will be changed to the new annotation @ConnectorConnectionFactoryDefinition. Below is its new definition.

@Documented
@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
public @interface ConnectorConnectionFactoryDefinition {
String name();
String description() default "";
String resourceAdapterName();
String connectionFactoryInterfaceName();
TransactionSupport.TransactionSupportLevel transactionSupport()
default TransactionSupport.TransactionSupportLevel.NoTransaction;
int maxPoolSize() default -1;
int minPoolSize() default -1;
String[] properties() default {};
}

The new draft of connector MR completed internal discussion. It will be sent out to EG in a few days.

Comment by Sivakumar Thyagarajan [ 12/Feb/13 04:17 PM ]

The final MR spec and javadoc describes the new annotations.
http://java.net/projects/connector-spec/downloads/download/connector-1_7-spec-final.pdf
http://java.net/projects/connector-spec/downloads/download/connector-1_7-javadoc-final.zip

Comment by dapeng_hu [ 27/Feb/13 05:48 AM ]

Add code change to support the annotation @ConnectionFactoryDefinition





[GLASSFISH-19170] 1.6 MR: Support Connector related Resource Definition Annotations that are introduced in Java EE 7 Created: 18/Oct/12  Updated: 06/Nov/12  Resolved: 06/Nov/12

Status: Closed
Project: glassfish
Component/s: jca
Affects Version/s: 4.0
Fix Version/s: 4.0

Type: Improvement Priority: Critical
Reporter: Sivakumar Thyagarajan Assignee: dapeng_hu
Resolution: Duplicate Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags:
Participants: dapeng_hu and Sivakumar Thyagarajan

 Description   

Support the various Connector related Resource Definition Annotations and their deployment descriptor equivalent that are being introduced in Java EE 7 (Section EE.5.19):

  • New annotations in the javax.resource pacakage @ConnectorResourceDefinition, @ConnectorResourceDefinitions, @AdministeredObjectDefinition, @AdministeredObjectDefinitions.

For resource definition annotations

  • Check for duplicates
  • Validate annotations


 Comments   
Comment by Sivakumar Thyagarajan [ 26/Oct/12 06:29 AM ]

Removed the requirement for "- CLI/Console support to list/view and manage the resource
created through these annotations." as it is not a spec required feature

Comment by dapeng_hu [ 06/Nov/12 09:21 AM ]

The DD validation feature has been implemented and CLI/Console support feature is removed. The other features are covered by the issues´╝Ü GLASSFISH-19240 "Connector Administered Object Definition" and GLASSFISH-19239 "Connector or Custom Resource Definition". So we can close this issue.





[GLASSFISH-19021] Fail to validate component-level resource definitions with same JNDI in different component scope Created: 20/Aug/12  Updated: 24/Aug/12  Resolved: 24/Aug/12

Status: Closed
Project: glassfish
Component/s: deployment
Affects Version/s: future release
Fix Version/s: 4.0

Type: Bug Priority: Major
Reporter: dapeng_hu Assignee: naman_mehta
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

File Attachments: Java Source File HelloEJB.java     Java Source File HelloStatefulEJB.java     Text File server.log    
Tags: validation deployment resource-definition
Participants: dapeng_hu and naman_mehta

 Description   

I found a problem when running the devtest connector/v3/datasource-definition/. I add one data source (as below) in each of the EJB class HelloEJB.java and HelloStatefulEJB.java respectively. Although these two component-level data sources share the same JNDI name, they do not conflict because they are in different EJB scope.

@DataSourceDefinition(name = "java:comp/env/Test_DataSource",
minPoolSize = 0,
initialPoolSize = 0,
className = "org.apache.derby.jdbc.ClientXADataSource",
portNumber = 1527,
serverName = "localhost",
user = "APP",
password = "APP",
databaseName = "hello-stateful-ejb-comp",
properties = {"connectionAttributes=;create=true"}
)

But the application deployment fails when validate resource descriptors, and throws out the following exception. Could you take a look?

[#|2012-08-19T20:39:21.708-0700|SEVERE|44.0|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=12;_ThreadName=Thread-2;|Application validation fails for given application [datasource-definitionApp] for jndi-name [java:comp/env/Test_DataSource]
java.lang.IllegalStateException: Application validation fails for given application [datasource-definitionApp] for jndi-name [java:comp/env/Test_DataSource]
at com.sun.enterprise.deployment.util.ApplicationValidator.accept(ApplicationValidator.java:106)
at com.sun.enterprise.deployment.BundleDescriptor.visit(BundleDescriptor.java:621)
at com.sun.enterprise.deployment.archivist.ApplicationArchivist.validate(ApplicationArchivist.java:755)
at com.sun.enterprise.deployment.archivist.ApplicationArchivist.openWith(ApplicationArchivist.java:244)
at com.sun.enterprise.deployment.archivist.ApplicationFactory.openWith(ApplicationFactory.java:235)
at org.glassfish.javaee.core.deployment.DolProvider.processDOL(DolProvider.java:188)
at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:222)
at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:96)
at com.sun.enterprise.v3.server.ApplicationLifecycle.loadDeployer(ApplicationLifecycle.java:871)
at com.sun.enterprise.v3.server.ApplicationLifecycle.setupContainerInfos(ApplicationLifecycle.java:811)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:373)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:228)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:466)

For your convenience, the HelloEJB.java, HelloStatefulEJB.java and the server's log file are attached.



 Comments   
Comment by naman_mehta [ 24/Aug/12 08:37 AM ]

Fixed the issue.

Sending dol/src/main/java/com/sun/enterprise/deployment/util/ApplicationValidator.java
Transmitting file data .
Committed revision 55618.





Generated at Fri Apr 18 11:13:35 UTC 2014 using JIRA 4.0.2#472.