[JBoss JIRA] (AS7-2968) @PreUpdate entity callback not running in caller's context when Container Managed Transactions are used
by jw (Created) (JIRA)
@PreUpdate entity callback not running in caller's context when Container Managed Transactions are used
-------------------------------------------------------------------------------------------------------
Key: AS7-2968
URL: https://issues.jboss.org/browse/AS7-2968
Project: Application Server 7
Issue Type: Bug
Components: EJB, JPA / Hibernate
Affects Versions: 7.1.0.Beta1
Reporter: jw
Assignee: jaikiran pai
If an Entity Bean has a @PreUpdate listener, the listener is not called in the context of the caller (session bean) in case of Container Managed Transactions.
As a result, an jndi lookup in the callback for 'java:comp/EJBContext' returns always null. The @PreUpdate callback should run in the context of the caller.
{noformat}
@Entity
@EntityListeners({ MyListener.class })
public class MyEntity {
...
}
{noformat}
{noformat}
public class MyListener {
@PreUpdate
@PrePersist
public void onEntityCallback(Object entity) {
EJBContext ctx;
ctx = createInitialContext().lookup("java:comp/EJBContext");
System.out.println(ctx.getCallerPrincipal().getName());
}
}
{noformat}
{noformat}
@Stateless
public class MyServiceBean implements MyServiceRemote {
@Override
public void updateEntity(MyEntity entity) {
entityManager.merge(entity);
}
}
{noformat}
This listener works fine on @PrePersist (Container- and Bean Managed Transactions) but fails on @PreUpdate with a NullPointerException if container managed transactions are used.
Workaround: use User Transactions instead of Container Managed Transactions
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 8 months
[JBoss JIRA] (JBAS-9470) JBoss 51.0 - Third party Jar Deployment fail with : Unable to find class path entry ClassPathEntryImpl {path=MyApp/APP-INF/lib/batik-all-1.7.jar} from fop.jar
by Mehul Kapadia (JIRA)
Mehul Kapadia created JBAS-9470:
-----------------------------------
Summary: JBoss 51.0 - Third party Jar Deployment fail with : Unable to find class path entry ClassPathEntryImpl {path=MyApp/APP-INF/lib/batik-all-1.7.jar} from fop.jar
Key: JBAS-9470
URL: https://issues.jboss.org/browse/JBAS-9470
Project: Application Server 3 4 5 and 6
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: ClassLoading, Deployers, EJB, VFS
Affects Versions: JBossAS-5.1.0.GA
Reporter: Mehul Kapadia
Assignee: Ales Justin
Fix For: No Release
While Trying to Deploy My EJB2.0 Application on JBoss 5.1.0 GA I am getting following Exception on Application server Startup for some of the Jars in MyApp/APP-INF/lib/
I have fop.jar and batik-all-1.7.jar present in my application's APP-INF/lib directory (But Exception complaining those file are not present in that location).
As per my understanding it looks like some bug in JBoss 5.1.0 GA , for the way third party jars are being loaded to JBoss Container. Because After we have removed Class-Path Entry from respective Jar(fop.jar and batik-all-1.7.jar)'s MANIFEST.mf file. This Exception is not coming.
Please guide me to get rid of this error, without performing manual step to remove Class-Path entry from Each jar's MANIFEST.mf file.
Please let me know if you need anymore information for clarification.
DETAILS:
****************
JBoss Version : jboss-5.1.0.GA
JDK Version:
--------------------------
java version "1.6.0_02-ea"
Java(TM) SE Runtime Environment (build 1.6.0_02-ea-b02)
Java HotSpot(TM) Client VM (build 1.6.0_02-ea-b02, mixed mode, sharing)
Exception Trace :
--------------------
2011-12-28 15:21:51,961 INFO [org.jboss.web.WebService] |Logger.java:296| Using RMI server codebase: http://172.19.102.61:8083/
2011-12-28 15:22:06,696 INFO [org.jboss.wsf.stack.jbws.NativeServerConfig] |Logger.java:296| JBoss Web Services - Stack Native Core
2011-12-28 15:22:06,696 INFO [org.jboss.wsf.stack.jbws.NativeServerConfig] |Logger.java:296| 3.1.2.GA
2011-12-28 15:22:08,009 INFO [org.jboss.dependency.plugins.AttributeCallbackItem] |Logger.java:296| Owner callback not implemented.
2011-12-28 15:22:10,009 INFO [org.jboss.logbridge.LogNotificationListener] |LogNotificationListener.java:71| Adding notification listener for logging mbean "jboss.system:service=Logging,type=Log4jService" to server org.jboss.mx.server.MBeanServerImpl@1135cd9[ defaultDomain='jboss' ]
2011-12-28 15:22:16,743 ERROR [org.jboss.system.server.profileservice.repository.ProfileDeployAction] |Logger.java:419| Failed to add deployment: fop.jar
org.jboss.deployers.spi.DeploymentException: Unable to find class path entry ClassPathEntryImpl{path=BancsApp/APP-INF/lib/batik-all-1.7.jar} from fop.jar
at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
at org.jboss.deployers.vfs.plugins.structure.VFSStructureBuilder.applyContextInfo(VFSStructureBuilder.java:188)
at org.jboss.deployers.structure.spi.helpers.AbstractStructureBuilder.populateContext(AbstractStructureBuilder.java:82)
at org.jboss.deployers.structure.spi.helpers.AbstractStructuralDeployers.determineStructure(AbstractStructuralDeployers.java:89)
at org.jboss.deployers.plugins.main.MainDeployerImpl.determineStructure(MainDeployerImpl.java:1004)
at org.jboss.deployers.plugins.main.MainDeployerImpl.determineDeploymentContext(MainDeployerImpl.java:440)
at org.jboss.deployers.plugins.main.MainDeployerImpl.addDeployment(MainDeployerImpl.java:390)
at org.jboss.deployers.plugins.main.MainDeployerImpl.addDeployment(MainDeployerImpl.java:300)
at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.addDeployment(MainDeployerAdapter.java:86)
at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:61)
at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)
at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:361)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at org.jboss.system.server.profileservice.repository.AbstractProfileService.activateProfile(AbstractProfileService.java:306)
at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:271)
at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)
at org.jboss.Main.boot(Main.java:221)
at org.jboss.Main$1.run(Main.java:556)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.io.IOException: Child not found BancsApp/APP-INF/lib/batik-all-1.7.jar for DelegatingHandler(a)12804443[path=BancsApp/APP-INF/lib/fop.jar context=file:/D:/Mehul/JBoss/jboss-5.1.0.GA/server/default/deploy/ real=file:/D:/Mehul/JBoss/jboss-5.1.0.GA/server/default/deploy/BancsApp/APP-INF/lib/fop.jar], available children: [ZipEntryHandler(a)19703023[path=BancsApp/APP-INF/lib/fop.jar/META-INF context=file:/D:/Mehul/JBoss/jboss-5.1.0.GA/server/default/deploy/ real=file:/D:/Mehul/JBoss/jboss-5.1.0.GA/server/default/deploy/BancsApp/APP-INF/lib/fop.jar/META-INF], ZipEntryHandler(a)26185[path=BancsApp/APP-INF/lib/fop.jar/org context=file:/D:/Mehul/JBoss/jboss-5.1.0.GA/server/default/deploy/ real=file:/D:/Mehul/JBoss/jboss-5.1.0.GA/server/default/deploy/BancsApp/APP-INF/lib/fop.jar/org]]
at org.jboss.virtual.VirtualFile.findChild(VirtualFile.java:461)
at org.jboss.deployers.vfs.plugins.structure.VFSStructureBuilder.applyContextInfo(VFSStructureBuilder.java:184)
... 23 more
2011-12-28 15:22:17,900 ERROR [org.jboss.system.server.profileservice.repository.ProfileDeployAction] |Logger.java:419| Failed to add deployment: xalan.jar
org.jboss.deployers.spi.DeploymentException: Unable to find class path entry ClassPathEntryImpl{path=BancsApp/APP-INF/lib/serializer.jar} from xalan.jar
at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
at org.jboss.deployers.vfs.plugins.structure.VFSStructureBuilder.applyContextInfo(VFSStructureBuilder.java:188)
at org.jboss.deployers.structure.spi.helpers.AbstractStructureBuilder.populateContext(AbstractStructureBuilder.java:82)
at org.jboss.deployers.structure.spi.helpers.AbstractStructuralDeployers.determineStructure(AbstractStructuralDeployers.java:89)
at org.jboss.deployers.plugins.main.MainDeployerImpl.determineStructure(MainDeployerImpl.java:1004)
at org.jboss.deployers.plugins.main.MainDeployerImpl.determineDeploymentContext(MainDeployerImpl.java:440)
at org.jboss.deployers.plugins.main.MainDeployerImpl.addDeployment(MainDeployerImpl.java:390)
at org.jboss.deployers.plugins.main.MainDeployerImpl.addDeployment(MainDeployerImpl.java:300)
at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.addDeployment(MainDeployerAdapter.java:86)
at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:61)
at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)
at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:361)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at org.jboss.system.server.profileservice.repository.AbstractProfileService.activateProfile(AbstractProfileService.java:306)
at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:271)
at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)
at org.jboss.Main.boot(Main.java:221)
at org.jboss.Main$1.run(Main.java:556)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.io.IOException: Child not found BancsApp/APP-INF/lib/serializer.jar for DelegatingHandler(a)13335932[path=BancsApp/APP-INF/lib/xalan.jar context=file:/D:/Mehul/JBoss/jboss-5.1.0.GA/server/default/deploy/ real=file:/D:/Mehul/JBoss/jboss-5.1.0.GA/server/default/deploy/BancsApp/
Regards,
Mehul Kapadia
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 8 months
[JBoss JIRA] Created: (AS7-1437) Unresolvable host name aborts server startup
by Nicklas Karlsson (JIRA)
Unresolvable host name aborts server startup
--------------------------------------------
Key: AS7-1437
URL: https://issues.jboss.org/browse/AS7-1437
Project: Application Server 7
Issue Type: Bug
Components: Server
Affects Versions: 7.0.0.Final
Reporter: Nicklas Karlsson
Assignee: Jason Greene
Starting AS7 on a host with a non-resolvable hostname fails with
13:48:46,158 ERROR [stderr] Exception in thread "Controller Boot Thread" java.lang.RuntimeException: org.jboss.as.controller.persistence.ConfigurationPersistenceException: Failed to parse configuration
13:48:46,159 ERROR [stderr] at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:89)
13:48:46,159 ERROR [stderr] at java.lang.Thread.run(Thread.java:722)
13:48:46,159 ERROR [stderr] Caused by: org.jboss.as.controller.persistence.ConfigurationPersistenceException: Failed to parse configuration
13:48:46,160 ERROR [stderr] at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:115)
13:48:46,160 ERROR [stderr] at org.jboss.as.controller.AbstractControllerService.boot(AbstractControllerService.java:104)
13:48:46,160 ERROR [stderr] at org.jboss.as.server.ServerService.boot(ServerService.java:193)
13:48:46,160 ERROR [stderr] at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:83)
13:48:46,164 ERROR [stderr] ... 1 more
13:48:46,164 ERROR [stderr] Caused by: java.lang.RuntimeException: Unable to determine a default name based on the local host name
13:48:46,165 ERROR [stderr] at org.jboss.as.controller.parsing.CommonXml.getDefaultName(CommonXml.java:184)
13:48:46,165 ERROR [stderr] at org.jboss.as.controller.parsing.StandaloneXml.readServerElement(StandaloneXml.java:137)
13:48:46,165 ERROR [stderr] at org.jboss.as.controller.parsing.StandaloneXml.readElement(StandaloneXml.java:91)
13:48:46,165 ERROR [stderr] at org.jboss.as.controller.parsing.StandaloneXml.readElement(StandaloneXml.java:79)
13:48:46,165 ERROR [stderr] at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:100)
13:48:46,174 ERROR [stderr] at org.jboss.staxmapper.XMLMapperImpl.parseDocument(XMLMapperImpl.java:59)
13:48:46,174 ERROR [stderr] at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:107)
13:48:46,175 ERROR [stderr] ... 4 more
13:48:46,175 ERROR [stderr] Caused by: java.net.UnknownHostException: nikbox.fi.dom: nikbox.fi.dom
13:48:46,175 ERROR [stderr] at java.net.InetAddress.getLocalHost(InetAddress.java:1438)
13:48:46,175 ERROR [stderr] at org.jboss.as.controller.parsing.CommonXml.getDefaultName(CommonXml.java:182)
13:48:46,175 ERROR [stderr] ... 10 more
13:48:46,176 ERROR [stderr] Caused by: java.net.UnknownHostException: nikbox.fi.dom
13:48:46,176 ERROR [stderr] at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method)
13:48:46,177 ERROR [stderr] at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:866)
13:48:46,177 ERROR [stderr] at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1258)
13:48:46,177 ERROR [stderr] at java.net.InetAddress.getLocalHost(InetAddress.java:1434)
13:48:46,177 ERROR [stderr] ... 11 more
One option would be to default to something if the operation fails so this wouldn't prevent server startup
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 8 months
[JBoss JIRA] (AS7-2717) Reinstate @Ignored tests in RemotingSubsystemTestCase
by Kabir Khan (Created) (JIRA)
Reinstate @Ignored tests in RemotingSubsystemTestCase
-----------------------------------------------------
Key: AS7-2717
URL: https://issues.jboss.org/browse/AS7-2717
Project: Application Server 7
Issue Type: Feature Request
Affects Versions: 7.1.0.Beta1
Reporter: Kabir Khan
Assignee: Kabir Khan
Fix For: 7.1.0.CR1
These tests fail intermittently in some environments
{code}
***org.jboss.as.remoting.RemotingSubsystemTestCase.testSubsystemWithThreadAttributeChange
junit.framework.AssertionFailedError: expected not same
at junit.framework.Assert.fail(Assert.java:50)
at junit.framework.Assert.failSame(Assert.java:276)
at junit.framework.Assert.assertNotSame(Assert.java:262)
at junit.framework.Assert.assertNotSame(Assert.java:269)
at org.jboss.as.remoting.RemotingSubsystemTestCase$CurrentConnectorAndController.checkStatus(RemotingSubsystemTestCase.java:273)
at org.jboss.as.remoting.RemotingSubsystemTestCase$CurrentConnectorAndController.updateCurrentEndpoint(RemotingSubsystemTestCase.java:263)
at org.jboss.as.remoting.RemotingSubsystemTestCase.updateAndCheckThreadAttribute(RemotingSubsystemTestCase.java:135)
at org.jboss.as.remoting.RemotingSubsystemTestCase.testSubsystemWithThreadAttributeChange(RemotingSubsystemTestCase.java:114)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
***org.jboss.as.remoting.RemotingSubsystemTestCase.testSubsystemWithConnectorPropertyChange
junit.framework.AssertionFailedError: expected not same
at junit.framework.Assert.fail(Assert.java:50)
at junit.framework.Assert.failSame(Assert.java:276)
at junit.framework.Assert.assertNotSame(Assert.java:262)
at junit.framework.Assert.assertNotSame(Assert.java:269)
at org.jboss.as.remoting.RemotingSubsystemTestCase$CurrentConnectorAndController.checkStatus(RemotingSubsystemTestCase.java:273)
at org.jboss.as.remoting.RemotingSubsystemTestCase$CurrentConnectorAndController.updateCurrentConnector(RemotingSubsystemTestCase.java:267)
at org.jboss.as.remoting.RemotingSubsystemTestCase.testSubsystemWithConnectorPropertyChange(RemotingSubsystemTestCase.java:164)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
***org.jboss.as.remoting.RemotingSubsystemTestCase.testSubsystemWithBadConnectorProperty
junit.framework.AssertionFailedError: Expected no service jboss.remoting.endpoint.subsystem
at junit.framework.Assert.fail(Assert.java:50)
at org.jboss.as.remoting.RemotingSubsystemTestCase.testSubsystemWithBadConnectorProperty(RemotingSubsystemTestCase.java:201)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 8 months
[JBoss JIRA] (JBRULES-3304) WorkItem unmarshalling does not use rulebase classloader
by Marco Rietveld (Created) (JIRA)
WorkItem unmarshalling does not use rulebase classloader
--------------------------------------------------------
Key: JBRULES-3304
URL: https://issues.jboss.org/browse/JBRULES-3304
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 5.3.0.Final
Reporter: Marco Rietveld
Assignee: Marco Rietveld
Priority: Minor
Fix For: 5.3.1.Final
Because the rulebase does not get inserted into the (marshaller) context that's used for unmarshalling a WorkItem(Info),
when {{MarshallerReaderContext.resolveClass(ObjectStreamClass)}} get's called, it can not use the ruleBase's root class loader.
If necessary, I can supply a test case for this to show where it goes wrong -- at the moment it disappeared with a stash I dropped so that I'll have to recreate it.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 8 months
[JBoss JIRA] (JBRULES-3321) isA operator does not work as expected with POJO facts
by Mike Melton (Created) (JIRA)
isA operator does not work as expected with POJO facts
------------------------------------------------------
Key: JBRULES-3321
URL: https://issues.jboss.org/browse/JBRULES-3321
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-core (expert)
Affects Versions: 5.3.0.Final
Reporter: Mike Melton
Assignee: Mark Proctor
Priority: Minor
Pasted from the rules-users list:
I am having trouble getting the isA operator to work with POJO facts. The problem manifests in the IsAEvaluator.evaluate(...) method, line 163 (5.3.0.Final). This line checks whether the objectValue class is annotated with @Traitable. For a @Traitable fact fully declared in DRL, this line correctly evaluates to true. For a POJO fact which is declared @Traitable in DRL, this line evaluates to false. (I tried adding @Traitable to the POJO fact itself, which results in the line evaluating true, but the next line which casts to a TraitableBean fails.) I have attached a test demonstrating the problem. There are two DRL files, one which declares a fact entirely, and another which adds @Traitable to a POJO fact. The declared fact and the POJO fact have identical structure, and the rules are also otherwise identical. However, the declared test passes, while the POJO test fails.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 8 months