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 194240 - Systematic exception during JUnit tests: no influence on the success or failure of the test
Summary: Systematic exception during JUnit tests: no influence on the success or failu...
Status: RESOLVED INCOMPLETE
Alias: None
Product: javaee
Classification: Unclassified
Component: Hibernate (show other bugs)
Version: 6.x
Hardware: PC Windows 7 x64
: P3 normal (vote)
Assignee: Sergey Petrov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-12 03:47 UTC by AlainC
Modified: 2011-02-24 16:06 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description AlainC 2011-01-12 03:47:19 UTC
Product Version = NetBeans IDE 6.9.1 (Build 201011082200)
Operating System = Windows 7 version 6.1 running on x86
Java; VM; Vendor = 1.6.0_23
Runtime = Java HotSpot(TM) Client VM 19.0-b09

(On a French system, JUnit 4.5)

To be able to test my EJBs I was obliged to do some magic like including glassfish-embedded-static-shell.jar in my test libraries and to do something like:

            Map<String, Object> properties = new HashMap<String, Object>();
            properties.put(EJBContainer.APP_NAME, "ProjectTest");
            properties.put(EJBContainer.MODULES, new File("build/classes"));
            javax.ejb.embeddable.EJBContainer container = javax.ejb.embeddable.EJBContainer.createEJBContainer(properties);
            javax.naming.Context context = container.getContext();
            MyEJBInterface myEJB = (MyEJBInterface) context.lookup("java:global/ProjectTest/MyEJBSingleton");

While executing tests, I can see the following message with no influence on the result of the test:

INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
11 janv. 2011 21:30:55 com.sun.enterprise.connectors.service.ConnectorConfigurationParserServiceImpl getFileContent
ATTENTION: Exception while performing resource-adapter's security permission check : 
java.io.FileNotFoundException: D:\...\gfembed5909334170016859010tmp\config\server.policy (Le fichier spécifié est introuvable)  //(The specified file is not found)
        at java.io.FileInputStream.open(Native Method)
        at java.io.FileInputStream.<init>(FileInputStream.java:106)
        at java.io.FileReader.<init>(FileReader.java:55)
        at com.sun.enterprise.connectors.service.ConnectorConfigurationParserServiceImpl.getFileContent(ConnectorConfigurationParserServiceImpl.java:133)
        at com.sun.enterprise.connectors.service.ConnectorConfigurationParserServiceImpl.getSecurityPermissionSpec(ConnectorConfigurationParserServiceImpl.java:92)
        at com.sun.enterprise.connectors.ConnectorRuntime.getSecurityPermissionSpec(ConnectorRuntime.java:495)
        at com.sun.enterprise.connectors.service.ResourceAdapterAdminServiceImpl.createActiveResourceAdapter(ResourceAdapterAdminServiceImpl.java:239)
        at com.sun.enterprise.connectors.service.ResourceAdapterAdminServiceImpl.createActiveResourceAdapter(ResourceAdapterAdminServiceImpl.java:338)
        at com.sun.enterprise.connectors.ConnectorRuntime.createActiveResourceAdapter(ConnectorRuntime.java:327)
        at com.sun.enterprise.connectors.service.ConnectorService.loadDeferredResourceAdapter(ConnectorService.java:164)
        at com.sun.enterprise.connectors.service.ConnectorService.loadResourcesAndItsRar(ConnectorService.java:133)
        at com.sun.enterprise.connectors.service.ConnectorService.checkAndLoadPool(ConnectorService.java:307)
        at com.sun.enterprise.connectors.service.ConnectorResourceAdminServiceImpl.createConnectorResource(ConnectorResourceAdminServiceImpl.java:91)
        at com.sun.enterprise.connectors.ConnectorRuntime.createConnectorResource(ConnectorRuntime.java:266)
        at com.sun.enterprise.resource.deployer.JdbcResourceDeployer.deployResource(JdbcResourceDeployer.java:107)
        at org.glassfish.javaee.services.ResourceProxy.create(ResourceProxy.java:84)
        at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:432)
        at javax.naming.InitialContext.lookup(InitialContext.java:392)
        at javax.naming.InitialContext.lookup(InitialContext.java:392)
        at com.sun.enterprise.connectors.service.ConnectorResourceAdminServiceImpl.lookup(ConnectorResourceAdminServiceImpl.java:203)
        at com.sun.enterprise.connectors.ConnectorRuntime.lookupPMResource(ConnectorRuntime.java:429)
        at org.glassfish.persistence.jpa.JPADeployer$ProviderContainerContractInfoImpl.lookupDataSource(JPADeployer.java:228)
        at org.glassfish.persistence.jpa.PersistenceUnitInfoImpl.<init>(PersistenceUnitInfoImpl.java:108)
        at org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:130)
        at org.glassfish.persistence.jpa.PersistenceUnitLoader.<init>(PersistenceUnitLoader.java:96)
        at org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:121)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:644)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:296)
        at org.glassfish.kernel.embedded.EmbeddedDeployerImpl.deploy(EmbeddedDeployerImpl.java:214)
        at org.glassfish.kernel.embedded.EmbeddedDeployerImpl.deploy(EmbeddedDeployerImpl.java:144)
        at org.glassfish.ejb.embedded.EJBContainerImpl.deploy(EJBContainerImpl.java:128)
        at org.glassfish.ejb.embedded.EJBContainerProviderImpl.createEJBContainer(EJBContainerProviderImpl.java:120)
        at javax.ejb.embeddable.EJBContainer.createEJBContainer(EJBContainer.java:102)
        at com.corp.btp.singleton.test.GlobalStatisticsSingletonTest.setUp(GlobalStatisticsSingletonTest.java:56)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
        at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
        at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
        at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
        at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:73)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:46)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
        at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
        at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
        at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
        at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:39)
        at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:518)
        at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:1052)
        at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:906)
11 janv. 2011 21:30:56 com.sun.ejb.containers.BaseContainer initializeHome
Comment 1 Tomas Danek 2011-01-12 07:43:55 UTC
it does not seem to me like NetBeans fault. Please evaluate.
Comment 2 AlainC 2011-01-12 19:16:52 UTC
It seems that it is a glassfish problem that is fixed for the future release.

But I still think that the "properties.put(EJBContainer.MODULES, new File("build/classes"));" thing needs a little simplification coming from the Netbeans gurus.
Comment 3 Sergey Petrov 2011-02-24 16:06:52 UTC
Is there  any nb issue in this issue? Or nb hibernate support issue?

I don't see any .netbeans. in stacktrace, also it may be valid exception as this jar may be supposed to be used in some environment with present "config\server.policy" and it may be missed in this setup.

Not sure what is about "simplification", do you mean its' good if nb will somehow handle tests setup with "glassfish-embedded-static-shell.jar" in your opinion? I have no hints but if it's and it's possible it's more like enhancement.