[JBossWS] - Exception when invoking EJB3 webservice from clients/SchemaB
by MmarcoM
hi all,
i have exposed an EJB3 as a webservice....
it is deployed fine on jboss, but whenn i try to invoke it from a client i got this bad exception..
| Exception in thread "main" java.rmi.RemoteException: Call invocation failed: Cou
| ld not transmit message; nested exception is:
| javax.xml.soap.SOAPException: Could not transmit message
| at org.jboss.ws.jaxrpc.CallImpl.invokeInternal(CallImpl.java:718)
| at org.jboss.ws.jaxrpc.CallImpl.invoke(CallImpl.java:404)
| at org.jboss.ws.jaxrpc.CallProxy.invoke(CallProxy.java:148)
| at $Proxy0.testWebServiceMethod(Unknown Source)
| at ws.jboss.org.samples.jsr181ejb.WSFacadeTester.doTest(WSFacadeTester.j
| ava:49)
| at ws.jboss.org.samples.jsr181ejb.WSFacadeTester.main(WSFacadeTester.jav
| a:34)
| Caused by: javax.xml.soap.SOAPException: Could not transmit message
| at org.jboss.ws.soap.SOAPConnectionImpl.call(SOAPConnectionImpl.java:204
| )
| at org.jboss.ws.jaxrpc.CallImpl.invokeInternal(CallImpl.java:687)
| ... 5 more
| Caused by: java.lang.NoSuchMethodError: org.jboss.xb.binding.sunday.unmarshallin
| g.SchemaBinding.setXopMarshaller(Lorg/jboss/xb/binding/sunday/xop/XOPMarshaller;
| )V
| at org.jboss.ws.jaxb.JBossXBMarshallerImpl.marshal(JBossXBMarshallerImpl
| .java:145)
| at org.jboss.ws.jaxrpc.encoding.JAXBSerializer.serialize(JAXBSerializer.
| java:107)
| at org.jboss.ws.soap.SOAPContentElement.getXMLFragment(SOAPContentElemen
| t.java:157)
| at org.jboss.ws.soap.SOAPContentElement.expandToDOM(SOAPContentElement.j
| ava:817)
| at org.jboss.ws.soap.SOAPContentElement.handleMTOMTransitions(SOAPConten
| tElement.java:1015)
| at org.jboss.ws.soap.SOAPContentElement.write(SOAPContentElement.java:96
| 8)
| at org.jboss.ws.soap.SAAJElementWriter.writeElement(SAAJElementWriter.ja
| va:171)
| at org.jboss.ws.soap.SAAJElementWriter.writeElement(SAAJElementWriter.ja
| va:184)
| at org.jboss.ws.soap.SAAJElementWriter.writeElement(SAAJElementWriter.ja
| va:184)
| at org.jboss.ws.soap.SAAJElementWriter.writeElement(SAAJElementWriter.ja
| va:184)
| at org.jboss.ws.soap.SAAJElementWriter.printInternal(SAAJElementWriter.j
| ava:163)
| at org.jboss.ws.soap.SAAJElementWriter.print(SAAJElementWriter.java:142)
|
| at org.jboss.ws.soap.SOAPMessageImpl.writeTo(SOAPMessageImpl.java:266)
| at org.jboss.ws.binding.soap.SOAPMessageMarshaller.write(SOAPMessageMars
| haller.java:78)
| at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnect
| ion(HTTPClientInvoker.java:164)
| at org.jboss.remoting.transport.http.HTTPClientInvoker.transport(HTTPCli
| entInvoker.java:81)
| at org.jboss.remoting.RemoteClientInvoker.invoke(RemoteClientInvoker.jav
| a:143)
| at org.jboss.remoting.Client.invoke(Client.java:525)
| at org.jboss.remoting.Client.invoke(Client.java:488)
| at org.jboss.ws.soap.SOAPConnectionImpl.call(SOAPConnectionImpl.java:189
| )
| ... 6 more
|
in running my client, i am launching application as follows..
| C:\Sw\J2MEJobApp\wsclient>java -cp activation.jar;jbossall-client.jar;jboss-xml-
| binding.jar;jbossws-client.jar;mail.jar;serializer.jar;xalan.jar;xercesImpl.jar;
| xml-apis.jar;target\wsclient-1.0-SNAPSHOT.jar;. ws.jboss.org.samples.jsr181ejb.WSFacadeTester
|
i m guessing there's a classpath clash... can anyone help me in fixing the problem?
thanks and regards
marco
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3978333#3978333
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3978333
19 years, 8 months
[Beginners Corner] - UndeclaredThrowableException and duplicate primary key
by kstrunk
Hello!
I'm really new to JBoss and I hope somebody can help me with my first problem I can't solve myself.
When I call create on a locale EntityBean with a primary key which already exists, I get an UndeclaredThrowableException which is caused by a DuplicateKeyException, but I really don't know why this happens.
The DuplicateKeyException is what I've expected. But why do I get the UndeclaredThrowableException?? Does anybody have an idea what I'm doing wrong?
Here is my code in my test servlet which is running in the bundled tomcat:
| Properties props = new Properties();
| props.setProperty(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
| props.setProperty(Context.URL_PKG_PREFIXES,"org.jboss.naming.client");
| props.setProperty(Context.PROVIDER_URL, "localhost");
|
| InitialContext initialContext = new InitialContext(props);
| MandatorLocalHome mandatorLocalHome = (MandatorLocalHome) initialContext.lookup(MandatorLocalHome.JNDI_NAME);
|
| Integer mandatorId = new Integer(1);
| try {
| MandatorLocal mandator = mandatorLocalHome.create(mandatorId);
| } catch (DuplicateKeyException e) {
| writer.write("mandator " + mandatorId + " already exists\n");
| }
|
My configuration:
JBoss 4.0.4
PostgreSQL 8.1
And here is the full stacktrace:
| 16:58:26,500 ERROR [STDERR] java.lang.reflect.UndeclaredThrowableException
| 16:58:26,500 ERROR [STDERR] at $Proxy166.create(Unknown Source)
| 16:58:26,531 ERROR [STDERR] at org.cryptobox.gui.TestServlet.doPost(TestServlet.java:49)
| 16:58:26,531 ERROR [STDERR] at org.cryptobox.gui.TestServlet.doGet(TestServlet.java:29)
| 16:58:26,531 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
| 16:58:26,531 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
| 16:58:26,531 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| 16:58:26,546 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| 16:58:26,546 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| 16:58:26,546 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| 16:58:26,546 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| 16:58:26,546 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
| 16:58:26,546 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
| 16:58:26,546 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
| 16:58:26,546 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
| 16:58:26,546 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
| 16:58:26,546 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
| 16:58:26,546 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
| 16:58:26,546 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
| 16:58:26,546 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
| 16:58:26,546 ERROR [STDERR] at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
| 16:58:26,546 ERROR [STDERR] at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
| 16:58:26,546 ERROR [STDERR] at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
| 16:58:26,546 ERROR [STDERR] at java.lang.Thread.run(Thread.java:595)
| 16:58:26,546 ERROR [STDERR] Caused by: javax.ejb.DuplicateKeyException: Entity with primary key 1 already exists
| 16:58:26,546 ERROR [STDERR] at org.jboss.ejb.plugins.cmp.jdbc.JDBCInsertPKCreateCommand.beforeInsert(JDBCInsertPKCreateCommand.java:99)
| 16:58:26,546 ERROR [STDERR] at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand.execute(JDBCAbstractCreateCommand.java:150)
| 16:58:26,546 ERROR [STDERR] at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.createEntity(JDBCStoreManager.java:587)
| 16:58:26,546 ERROR [STDERR] at org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPPersistenceManager.java:237)
| 16:58:26,546 ERROR [STDERR] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.createEntity(CachedConnectionInterceptor.java:225)
| 16:58:26,546 ERROR [STDERR] at org.jboss.ejb.EntityContainer.createLocalHome(EntityContainer.java:618)
| 16:58:26,546 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| 16:58:26,546 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| 16:58:26,546 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| 16:58:26,546 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
| 16:58:26,546 ERROR [STDERR] at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
| 16:58:26,546 ERROR [STDERR] at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:1130)
| 16:58:26,546 ERROR [STDERR] at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:105)
| 16:58:26,546 ERROR [STDERR] at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:203)
| 16:58:26,546 ERROR [STDERR] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:189)
| 16:58:26,546 ERROR [STDERR] at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:105)
| 16:58:26,546 ERROR [STDERR] at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:134)
| 16:58:26,546 ERROR [STDERR] at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:76)
| 16:58:26,546 ERROR [STDERR] at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:43)
| 16:58:26,546 ERROR [STDERR] at org.jboss.ejb.plugins.CallValidationInterceptor.invokeHome(CallValidationInterceptor.java:56)
| 16:58:26,546 ERROR [STDERR] at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:125)
| 16:58:26,546 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
| 16:58:26,546 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:161)
| 16:58:26,546 ERROR [STDERR] at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:145)
| 16:58:26,546 ERROR [STDERR] at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:132)
| 16:58:26,546 ERROR [STDERR] at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:107)
| 16:58:26,546 ERROR [STDERR] at org.jboss.ejb.EntityContainer.internalInvokeHome(EntityContainer.java:514)
| 16:58:26,546 ERROR [STDERR] at org.jboss.ejb.Container.invoke(Container.java:975)
| 16:58:26,546 ERROR [STDERR] at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invokeHome(BaseLocalProxyFactory.java:359)
| 16:58:26,546 ERROR [STDERR] at org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:133)
| 16:58:26,546 ERROR [STDERR] ... 23 more
|
Thanx very much for help!
Karsten
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3978331#3978331
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3978331
19 years, 8 months
[JBoss Messaging] - Re: Reset button
by jaap
At your service :)
JCA posts:
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=91882
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=91064
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=87175
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=87807
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=61812
hmmmmm....
We solved a lot of our problems by closing the connections. You can turn logging on for this with the Debug set to true. And no warnings we receive for that anymore. In our code we open and close connections like this:
| Session s = null;
| try {
| s = SessionLocator.newSession();
| //bla bla
| } catch (Exception e) {
| l.fatal("bla more bla", e);
| } finally {
| try {
| s.close();
| } catch (Exception e) {}
| }
|
We also tried to check closing Resultsets (<track-statements>true</track-statements>), but that produces a lot of warnings, the reason for that is we use Hibernate (cannot find forum entry, but it is a known (non) issue).
We have these problems more or less since JBoss 3, now using 4.0.4. Hibernate vs 2 and 3.1.
mysql-ds:
| <local-tx-datasource>
| <jndi-name>Database</jndi-name>
|
| <connection-url>jdbc:mysql://localhost:3306/jst_objects?characterEncoding=ISO8859-1&cachePrepStmts=true&jdbcCompliantTruncation=false</connection-url>
| <driver-class>com.mysql.jdbc.Driver</driver-class>
| <user-name>web</user-name>
| <password>1234</password>
| <min-pool-size>5</min-pool-size>
| <max-pool-size>1050</max-pool-size>
| <idle-timeout-minutes>5</idle-timeout-minutes> <exception-sorter-class-name>com.mysql.jdbc.integration.jboss.ExtendedMysqlExceptionSorter</exception-sorter-class-name> <valid-connection-checker-class-name>com.mysql.jdbc.integration.jboss.TimeoutMySQLValidConnectionChecker</valid-connection-checker-class-name>
| <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name>
| <metadata>
| <type-mapping>mySQL</type-mapping>
| </metadata>
| <attribute name="Debug">true</attribute>
| <track-statements>true</track-statements>
| </local-tx-datasource>
|
The database reports:
| show processlist;
|
| | 5864 | web | localhost:57348 | jst_objects | Sleep | 16207 | | 5865 | web | localhost:57104 | jst_objects | Sleep | 16279 |
| | 5866 | web | localhost:42541 | jst_objects | Sleep | 15912 |
| | 5875 | web | localhost:49491 | jst_objects | Sleep | 15806 |
| | 5877 | web | localhost:37892 | jst_objects | Sleep | 15755 | | ......
| 157 rows in set (0.00 sec)
|
| status;
| .....
| Threads: 155 Questions: 33777278 Slow queries: 0 Opens: 41 Flush tables: 1 Open tables: 64 Queries per second avg: 244.696
|
|
You can see that MySQL has a lot of unused, idle connections (16207 for example means a hell of a lot more then <idle-timeout-minutes>5</idle-timeout-minutes>).
With a system load of 250 queries per second, 50 concurrent connections should be enouh.
So, IMHO, there is a lot of drivel on the forums about runaway connections in JCA. And we have problems with one heavy loaded JBossMQ queue that is stalling. The other queues are running flawless. My hunch is that the stalling MQ is causing the connections to become idle. So, i want to remove that and put in another messaging system.
Looking for replacements ActiveMQ for example seems to be a mature replacement for JBossMQ, but i believe (searching the posts) it cannot be embedded in JBoss when using MDB:
http://www.jboss.org/index.html?module=bb&op=viewtopic&t=85381
Would be JBoss Messaging be a good replacement candidate? Therefor my post.
Another solution i drivelled would indeed be to drop JCA. It is, looking at the posts and my experience, proven itchy. Itchy is no problem when the software running on it is closing connections like they should, but that is with more complex system not always the case and will always be a threat to the robustness of the system.
anonymous wrote :
| or at the very least post your issue to the JCA forum
|
Especially the JCA forum is a place where i would hesitate to post an issue. Posters often get cyberkilled there, exemplified by their supposed stupidity:
http://www.jboss.org/index.html?module=bb&op=viewtopic&t=68044
and yet another 'too many connections' would not contribute to the many similar unanswered posts.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3978324#3978324
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3978324
19 years, 8 months
[EJB/JBoss] - Question on specifying BATCH size and FETCH type
by elenh
Hi,
I'm new to JBoss - EJB and I try to understand how can I use methods to optimize prformance of my app in JBoss.
I use JBoss seam, EJB3, postgreSQL. My application is very similar to the booking example of seam. But I want to optimize the way data are fetched from the database. I have read about the methods used by Hibernate for optimization, as specifying the fetch type on HQL queries (as I might not specify an eager fetch type on the Join column) and configure the batch size.
I would just like to know if I can use any of the above with Jboss EJB3. Or maybe another method for optimization, that I'm not aware of.
I wasn't able to find information related to my questions in the jboss EJB3 documentation and I cannot distinguish what is supported only by Hibernate and what by both Hibernate and EJB3. Maybe I haven't found the right documentation to read...
Can anyone help me?
Thanks a lot,
Elenh.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3978322#3978322
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3978322
19 years, 8 months