[EJB 3.0] - EntityManager.flush() terminated transaction on constraint v
by mwoelke
Hi,
We discovered a problem with the flush operation of the entitymanager.
If you try to delete an entity, which is referenced by another, this results in a constraint violation exception at flush or commit time, which is fine. BUT, if you force the entitymanager to flush its statements to the database and one of these statements causes a constraint violation the transaction seems to get terminated. The causing exception is thrown and can be caught but if you do so, you cant react to it by database operations since you dont have an active transaction anymore.
Did anyone else experience this behavior.
Is that a known bug?
Which JIRA tracking system would be the right one for this problem (hibernate of jboss ejb3).
Why does flush itself handle the exception, why doesnt it simply rethrow it?
Any comments are appreciated.
Regards, Milan Wölke
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3983781#3983781
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3983781
19Â years, 6Â months
[Beginners Corner] - JBoss Oracle
by MeTitus
Hi you all,
I am trying to install the Oracle driver into JBoss Web, but I am stuck with the above error message:
|
| 14:44:34,407 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'java:DefaultDS'
| 14:44:34,438 ERROR [MainDeployer] Could not initialise deployment: file:/E:/Program Files/jboss/jbossweb-1.0.0.GA/server/default/deploy/oracle-ds.xml
| org.jboss.deployment.DeploymentException: Could not parse dd; - nested throwable: (org.xml.sax.SAXParseException: Content is not allowed in prolog.)
| at org.jboss.deployment.XSLSubDeployer.findDd(XSLSubDeployer.java:231)
| at org.jboss.deployment.XSLSubDeployer.init(XSLSubDeployer.java:161)
| at org.jboss.deployment.MainDeployer.init(MainDeployer.java:861)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:798)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
| 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:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy8.deploy(Unknown Source)
| at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
| at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
| at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
| at $Proxy0.start(Unknown Source)
| at org.jboss.system.ServiceController.start(ServiceController.java:417)
| at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy4.start(Unknown Source)
| at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
| at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1007)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:808)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:755)
| 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:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy5.deploy(Unknown Source)
| at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
| at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
| at org.jboss.Main.boot(Main.java:200)
| at org.jboss.Main$1.run(Main.java:464)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: org.xml.sax.SAXParseException: Content is not allowed in prolog.
| at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
| at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
| at javax.xml.parsers.DocumentBuilder.parse(Unknown Source)
| at org.jboss.deployment.XSLSubDeployer.findDd(XSLSubDeployer.java:227)
| ... 69 more
| 14:44:34,500 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=.../deploy/jmx-console.war/
| 14:44:34,609 INFO [[/jmx-console]] php: init: loglevel set to 0
| 14:44:34,641 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
|
| --- Incompletely deployed packages ---
| org.jboss.deployment.DeploymentInfo@216bd071 { url=file:/E:/Program Files/jboss/jbossweb-1.0.0.GA/server/default/deploy/oracle-ds.xml }
| deployer: org.jboss.deployment.XSLSubDeployer@6078e7
| status: null
|
|
Does anyone have a clue about what might be causing this error.
Many Thanks,
MeTitus
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3983776#3983776
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3983776
19Â years, 6Â months
[JBossCache] - Cross-reference problem
by finnam
Hi guys!
We've met a problem with JBoss cache and we don't know if it's a bug or usage problem.
We have an annotated User class wich has an ArrayList buddies property. We put two instances of User class to the cache and each instance has a reference to another one from the buddies list. The code is like this:
| User user1 = new User();
| User user2 = new User();
| cache.putObject(user1.getFqn(), user1);
| cache.putObject(user2.getFqn(), user2);
| //skipped
| user1.getBuddies().add(user2);
| //skipped
| user2.getBuddies().add(user1);
|
On some event we are removing user1 from the cache:
| user2.getBuddies().remove(user1);
| cache.removeObject(user1.getFqn());
|
And then we are putting it again:
| cache.putObject(user1.getFqn(), user1);
| user2.getBuddies().add(user1);
|
This last line of code throws IllegalStateException with the following message:
AopInstance.incrementRefCount: source fgn /users/user1 is already present.
After a small debugging we added following befor removing user1 from cache:
user1.getBuddies().clean();
And all the problems are gone.
So, should we really remove all the references to the cached objects from user1 before removing it from the cache or it's a problem of illegal usage?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3983774#3983774
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3983774
19Â years, 6Â months
[Installation, Configuration & Deployment] - Keep getting a java.io.IOException
by andydale
Hi,
I have managed to set up JBoss servers before whitout any problem, but i am currently experiencing a few issues. 2 Servers recently had a fresh Fedora Core 5 install, and now i cannot get JBoss to start without errors (related to UDP multicasting).
The current exception i get is:
java.lang.Exception: dest=/233.3.3.21:45551 (52 bytes)
| at org.jgroups.protocols.UDP._send(UDP.java:356)
| at org.jgroups.protocols.UDP.sendToAllMembers(UDP.java:300)
| at org.jgroups.protocols.TP.doSend(TP.java:938)
| at org.jgroups.protocols.TP.send(TP.java:927)
| at org.jgroups.protocols.TP.down(TP.java:716)
| at org.jgroups.stack.DownHandler.run(Protocol.java:120)
| Caused by: java.io.IOException: Network is unreachable
| at java.net.PlainDatagramSocketImpl.send(Native Method)
| at java.net.DatagramSocket.send(DatagramSocket.java:612)
| at org.jgroups.protocols.UDP._send(UDP.java:330)
| ... 5 more
| 2006-11-07 14:52:03,091 ERROR [org.jgroups.protocols.UDP] failed sending message
| java.lang.Exception: dest=/233.3.3.21:45551 (52 bytes)
| at org.jgroups.protocols.UDP._send(UDP.java:356)
| at org.jgroups.protocols.UDP.sendToAllMembers(UDP.java:300)
| at org.jgroups.protocols.TP.doSend(TP.java:938)
| at org.jgroups.protocols.TP.send(TP.java:927)
| at org.jgroups.protocols.TP.down(TP.java:716)
| at org.jgroups.stack.DownHandler.run(Protocol.java:120)
| Caused by: java.io.IOException: Network is unreachable
| at java.net.PlainDatagramSocketImpl.send(Native Method)
| at java.net.DatagramSocket.send(DatagramSocket.java:612)
| at org.jgroups.protocols.UDP._send(UDP.java:330)
| ... 5 more
I am pretty certain multicasting is enabled as i have the following entry in /sbin/ifconfig
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
I am using JBoss 4.0.4GA along with Java 1.5.0_08
Does anyone have an idea what is causing the problem ??
Thanks in advance,
Andy
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3983772#3983772
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3983772
19Â years, 6Â months