I am trying to convert an application from Glassfish 4 to GF 5.1. For some reason I am having trouble creating JDBC connection pools using MySQL. I am using the connector 5.1.39. When I try to add a property to the connection pool. I get the a 500 internal server error. Glassfish gives me the following error messages. Would appreciate any help.
Severe: JSF1007: Duplicate component ID event152 found in view.
Severe: +id: j_id1
type: javax.faces.component.UIViewRoot#3d270f60
+id: sun_page51
Warning: StandardWrapperValve[FacesServlet]: Servlet.service() for servlet FacesServlet threw exception
java.lang.IllegalStateException: getOutputStream() has already been called for this response
at org.apache.catalina.connector.Response.getWriter(Response.java:695)
at org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:180)
at com.sun.faces.context.ExternalContextImpl.getResponseOutputWriter(ExternalContextImpl.java:912)
at com.sun.faces.context.PartialViewContextImpl.createPartialResponseWriter(PartialViewContextImpl.java:538)
at com.sun.faces.context.PartialViewContextImpl.access$300(PartialViewContextImpl.java:64)
at com.sun.faces.context.PartialViewContextImpl$DelayedInitPartialResponseWriter.getWrapped(PartialViewContextImpl.java:679)
at javax.faces.context.PartialResponseWriter.startDocument(PartialResponseWriter.java:91)
at com.sun.faces.context.AjaxExceptionHandlerImpl.handlePartialResponseError(AjaxExceptionHandlerImpl.java:179)
at com.sun.faces.context.AjaxExceptionHandlerImpl.handle(AjaxExceptionHandlerImpl.java:101)
at javax.faces.context.ExceptionHandlerWrapper.handle(ExceptionHandlerWrapper.java:93)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:94)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:199)
at javax.faces.webapp.FacesServlet.executeLifecyle(FacesServlet.java:708)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:451)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1540)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:297)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:167)
at com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:227)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:209)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:167)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:215)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:119)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:611)
at org.apache.catalina.core.StandardPipeline.doChainInvoke(StandardPipeline.java:555)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:114)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:332)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:199)
at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:439)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:144)
at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:182)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:156)
at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:218)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:95)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:260)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:177)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:109)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:88)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:53)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:515)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:89)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:94)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:33)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:114)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:569)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:549)
at java.lang.Thread.run(Thread.java:748)
Related
I have created MySQL sink connector and successfully run and i see the logs and got 200 response, But the sink connector not able to push the data into mysql db (data is available in the topic)
{
"name":"mysql-sink-connector",
"config":{ "tasks.max":"2",
"batch.size":"1000",
"batch.max.rows":"1000",
"poll.interval.ms":"500",
"connector.class":"io.confluent.connect.jdbc.JdbcSinkConnector",
"connection.url":"jdbc:mysql://mysql.azure.com:3306/db_test_dev",
"table.name.format":"tbl_clients_merchants",
"topics":"createorder",
"connection.user":"user",
"connection.password":"password",
"auto.create":"true",
"auto.evolve":"true",
"value.converter":"org.apache.kafka.connect.json.JsonConverter",
"value.converter.schemas.enable":"true",
"key.converter":"org.apache.kafka.connect.json.JsonConverter",
"key.converter.schemas.enable":"true"
}}
getting an error
[2021-07-29 09:41:03,157] ERROR WorkerSinkTask{id=jdbc-mysql-sink-connector-1} Task threw an uncaught and unrecoverable exception (org.apache.kafka.connect.runtime.WorkerTask:177) org.apache.kafka.connect.errors.ConnectException: Tolerance exceeded in error handler
at org.apache.kafka.connect.runtime.errors.RetryWithToleranceOperator.execAndHandleError(RetryWithToleranceOperator.java:178)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748) Caused by: org.apache.kafka.connect.errors.DataException: Converting byte[] to Kafka Connect data failed due to serialization error:
at org.apache.kafka.connect.json.JsonConverter.toConnectData(JsonConverter.java:344)
at java.lang.Thread.run(Thread.java:748) Caused by: org.apache.kafka.connect.errors.DataException: Unknown schema type: null
at org.apache.kafka.connect.json.JsonConverter.convertToConnect(JsonConverter.java:743
at org.apache.kafka.connect.runtime.errors.RetryWithToleranceOperator.execAndHandleError(RetryWithToleranceOperator.java:162) ... 13 more
[2021-07-29 13:26:11,347] ERROR WorkerSinkTask{id=mysql-sink-connector-0} Task is being killed and will not recover until manually restarted (org.apache.kafka.connect.runtime.WorkerTask:178)
As the error suggests, you have null tombstone records in the topic, which cannot be mapped to any MySQL columns since there are no field names.
Option 1) Fix your producer to not send these messages
Option 2) Filter them in Connect
For example,
"transforms": "Filter",
"transforms.Filter.type": "org.apache.kafka.connect.transforms.Filter",
"transforms.Filter.predicate" : "DropNull",
"predicates" : "DropNull",
"predicates.DropNull.type": "org.apache.kafka.connect.transforms.predicates.RecordIsTombstone"
I am using springboot to connect to a mysql database. Please find my configuration below
spring.datasource.url=jdbc:<connection-url>
spring.datasource.username=<username>
spring.datasource.password=<password>
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.jpa.show-sql=true
spring.jpa.hibernate.ddl-auto=update
spring.jpa.properties.hibernate.format_sql=true
spring.datasource.tomcat.max-active=50
spring.datasource.tomcat.max-idle=20
spring.datasource.tomcat.max-wait=20000
spring.datasource.tomcat.min-idle=15
Api code
#CrossOrigin(origins = "*", allowedHeaders = "*")
#GetMapping(value = "/validateuser/{consumerName}")
#Transactional
public Boolean valiadateuser(#PathVariable String consumerName) {
LOGGER.info("Inside validateuser -1");
ConsumerName user = consumerRepository.findByName(consumerName);
LOGGER.info("Inside validateuser -2 :::: " + user);
if (user != null) {
return Boolean.TRUE;
}
return Boolean.FALSE;
}
Below is my exception
org.springframework.orm.jpa.JpaSystemException: Unable to commit against JDBC Connection; nested exception is org.hibernate.TransactionException: Unable to commit against JDBC Connection
at org.springframework.orm.jpa.vendor.HibernateJpaDialect.convertHibernateAccessException(HibernateJpaDialect.java:353) ~[spring-orm-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
at org.springframework.orm.jpa.vendor.HibernateJpaDialect.translateExceptionIfPossible(HibernateJpaDialect.java:255) ~[spring-orm-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
at org.springframework.orm.jpa.JpaTransactionManager.doCommit(JpaTransactionManager.java:538) ~[spring-orm-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:743) [spring-tx-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:711) [spring-tx-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
at org.springframework.transaction.interceptor.TransactionAspectSupport.completeTransactionAfterThrowing(TransactionAspectSupport.java:665) [spring-tx-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:370) [spring-tx-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:118) [spring-tx-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) [spring-aop-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:749) [spring-aop-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:691) [spring-aop-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
at com.server.controller.SubscribeController$$EnhancerBySpringCGLIB$$14f090fd.subscribeTopic(<generated>) [classes!/:0.0.1-SNAPSHOT]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_251]
Got the answer
updated the resource.properties
spring.datasource.url=jdbc:<connection-url>
spring.datasource.username=<username>
spring.datasource.password=<password>
#spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.jpa.show-sql=true
spring.jpa.hibernate.ddl-auto=update
spring.datasource.hikari.connectionTimeout=20000
spring.datasource.hikari.maximumPoolSize=5
I was experiencing the same exception on my Spring / Postgres stack. Basically, the DB can not return/commit all the rows that match your query in time.
It can be fixed by creating indexes on the columns used in the particular query. This speeds the query up.
CREATE INDEX index_redflag_person
ON redflag_person (firstname, alias,lastname,address,birthplace);
I use Spring and Hibernate and PostgreSQL for practice, got the similar exception:
org.springframework.transaction.TransactionSystemException: Could not commit Hibernate transaction;
nested exception is org.hibernate.TransactionException:
Unable to commit against JDBC Connection] with root cause
org.postgresql.util.PSQLException: Cannot commit when autoCommit is enabled.
my hibernate.prop has some config below
hibernate.dialect=org.hibernate.dialect.PostgreSQL10Dialect
hibernate.connection.handling_mode=DELAYED_ACQUISITION_AND_RELEASE_AFTER_STATEMENT
packages.to.scan=org.practice.dao.entity
It's weird bcs the default hibernate.connection.autocommit value in hibernate 5.6 is false
After a whole day search, I could not find the same error on the internet, finally I figured it out: somehow I added hibernate.connection.handling_mode in my config file, remove it(the default is fine) and the app works as expected
so maybe check the config and use the simplest param would help someone else
I have two pure Java EE applications, RemoteApp and ClientApp. I want to use ClientApp to access RemoteApp through a remote EJB to perfom some persistent action. I using JTA and CMT but when invoke anyone RemoteApp method in a Persistence Context and perform some Database action, the server simply does not respond until a transaction timeOut occurs.
To materialize what I said, I'll show the core code:
RemoteApp code:
package br.com;
#Remote
interface IRemote {void method();}
#Stateless
//I explained the use of these below annotations only for clarity
#TransactionManagement(value = TransactionManagementType.CONTAINER)
#TransactionAttribute(value = TransactionAttributeType.REQUIRED)
class Remote implements IRemote {
#PersistenceContext
private EntityManager em;
void method(){
em.persist(new MyEntity()); //A simple action just to example a Persistence Context situation
}
Persistence.xml of RemoteApp:
<persistence-unit name="remoteAppPU" transaction-type="JTA">
<jta-data-source>jdbc/remoteAppDS</jta-data-source>
<properties>
<property name="javax.persistence.jdbc.driver" value="com.mysql.jdbc.jdbc2.optional.MysqlXADataSource" />
<property name="eclipselink.ddl-generation.table-creation-suffix" value="engine=InnoDB"/>
</properties>
</persistence-unit>
Datasource of Glassfish domain of RemoteApp (config.xml):
<jdbc-connection-pool datasource-classname="com.mysql.jdbc.jdbc2.optional.MysqlXADataSource" name="remoteAppPool" res-type="javax.sql.XADataSource">
<property name="user" value="user"></property>
<property name="url" value="jdbc:mysql://remoteApp:3306/remoteAppDB"></property>
<property name="password" value="password"></property>
</jdbc-connection-pool>
<jdbc-resource pool-name="remoteAppPool" jndi-name="jdbc/remoteAppDS"></jdbc-resource>
Client-App code:
#Stateless
class LocalBean {
#EJB(mappedName = "corbaname:iiop:server.com:3700#java:global/RemoteApp/Remote!br.com.IRemote"
private IRemote remote;
#TransactionAttribute
void testMethod(){remote.method();}
}
When ClientApp invokes a RemoteApp method i got a exception after 30 minutes (I can't found a way to decrease this time):
javax.ejb.EJBException: Unable to complete container-managed transaction.
at com.sun.ejb.containers.EJBContainerTransactionManager.completeNewTx(EJBContainerTransactionManager.java:734)
at com.sun.ejb.containers.EJBContainerTransactionManager.postInvokeTx(EJBContainerTransactionManager.java:507)
at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:4600)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2108)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2078)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:220)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:88)
at com.sun.proxy.$Proxy283.testar(Unknown Source)
at br.com.ejb.EJB31_Generated__LocalBean__Intf____Bean.method(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory.lambda$static$0(ResourceMethodInvocationHandlerFactory.java:76)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:148)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:191)
at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$TypeOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:243)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:103)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:493)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:415)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:104)
at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:277)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:272)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:268)
at org.glassfish.jersey.internal.Errors.process(Errors.java:316)
at org.glassfish.jersey.internal.Errors.process(Errors.java:298)
at org.glassfish.jersey.internal.Errors.process(Errors.java:268)
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:289)
at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:256)
at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:703)
at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:416)
at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:370)
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:389)
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:342)
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:229)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1580)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:258)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:652)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:591)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:371)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:238)
at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:463)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:168)
at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:206)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:180)
at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:242)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:539)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:593)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:573)
at java.lang.Thread.run(Thread.java:748)
Caused by: javax.transaction.SystemException: org.omg.CORBA.UNKNOWN: ----------BEGIN server-side stack trace----------
org.omg.CORBA.UNKNOWN: ADVERTÊNCIA: 00010002: Unknown user exception thrown by the server - exception: javax.persistence.PersistenceException; message: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.7.0.v20170811-d680af5): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: org.omg.CORBA.COMM_FAILURE: ADVERTÊNCIA: 00410019: Communications timeout waiting for response. Exceeded 1.800.000 milliseconds vmcid: OMG minor code: 19 completed: Maybe
Error Code: 0
Call: INSERT INTO MYENTITY (NAME) VALUES (?)
bind => [bla]
Query: InsertObjectQuery(br.com.MyEntity#0) vmcid: OMG minor code: 2 completed: Maybe
at com.sun.proxy.$Proxy194.runtimeexception(Unknown Source)
at com.sun.corba.ee.impl.protocol.MessageMediatorImpl.convertThrowableToSystemException(MessageMediatorImpl.java:1764)
at com.sun.corba.ee.impl.protocol.MessageMediatorImpl.handleThrowableDuringServerDispatch(MessageMediatorImpl.java:1714)
at com.sun.corba.ee.impl.protocol.MessageMediatorImpl.handleThrowableDuringServerDispatch(MessageMediatorImpl.java:1679)
at com.sun.corba.ee.impl.protocol.ServerRequestDispatcherImpl.dispatch(ServerRequestDispatcherImpl.java:255)
at com.sun.corba.ee.impl.protocol.MessageMediatorImpl.handleRequestRequest(MessageMediatorImpl.java:1550)
at com.sun.corba.ee.impl.protocol.MessageMediatorImpl.handleRequest(MessageMediatorImpl.java:1426)
at com.sun.corba.ee.impl.protocol.MessageMediatorImpl.handleInput(MessageMediatorImpl.java:931)
at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:213)
at com.sun.corba.ee.impl.protocol.MessageMediatorImpl.handleRequest(MessageMediatorImpl.java:695)
at com.sun.corba.ee.impl.protocol.MessageMediatorImpl.dispatch(MessageMediatorImpl.java:497)
at com.sun.corba.ee.impl.protocol.MessageMediatorImpl.doWork(MessageMediatorImpl.java:2223)
at com.sun.corba.ee.impl.threadpool.ThreadPoolImpl$WorkerThread.performWork(ThreadPoolImpl.java:497)
at com.sun.corba.ee.impl.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:540)
Caused by: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.7.0.v20170811-d680af5): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: org.omg.CORBA.COMM_FAILURE: ADVERTÊNCIA: 00410019: Communications timeout waiting for response. Exceeded 1.800.000 milliseconds vmcid: OMG minor code: 19 completed: Maybe
Error Code: 0
Call: INSERT INTO MYENTITY (NAME) VALUES (?)
bind => [bla]
Query: InsertObjectQuery(br.com.MyEntity#0)
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl$1.handleException(EntityManagerSetupImpl.java:772)
at org.eclipse.persistence.transaction.AbstractSynchronizationListener.handleException(AbstractSynchronizationListener.java:275)
at org.eclipse.persistence.transaction.AbstractSynchronizationListener.beforeCompletion(AbstractSynchronizationListener.java:170)
at org.eclipse.persistence.transaction.JTASynchronizationListener.beforeCompletion(JTASynchronizationListener.java:68)
at com.sun.jts.jta.SynchronizationImpl.before_completion(SynchronizationImpl.java:99)
at com.sun.jts.CosTransactions.RegisteredSyncs.distributeBefore(RegisteredSyncs.java:141)
at com.sun.jts.CosTransactions.TopCoordinator.beforeCompletion(TopCoordinator.java:2548)
at com.sun.jts.CosTransactions.CoordinatorSynchronizationImpl.before_completion(CoordinatorSynchronizationImpl.java:165)
at org.omg.CosTransactions.SynchronizationPOA._invoke(SynchronizationPOA.java:39)
at com.sun.corba.ee.impl.protocol.ServerRequestDispatcherImpl.dispatchToServant(ServerRequestDispatcherImpl.java:528)
at com.sun.corba.ee.impl.protocol.ServerRequestDispatcherImpl.dispatch(ServerRequestDispatcherImpl.java:199)
... 9 more
Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.7.0.v20170811-d680af5): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: org.omg.CORBA.COMM_FAILURE: ADVERTÊNCIA: 00410019: Communications timeout waiting for response. Exceeded 1.800.000 milliseconds vmcid: OMG minor code: 19 completed: Maybe
Error Code: 0
Call: INSERT INTO MYENTITY (NAME) VALUES (?)
bind => [bla]
Query: InsertObjectQuery(br.com.MyEntity#0)
... repeated log
Here are some observations:
Both Apps are in different containers and security configs are disable.
I have been used Glassfish Server 5.0 with Java EE Specification 8.0
I have ben used mysql 5.7 with XA Protocol and engine InnoDB on tables
If I don't use a Persistence Context / persistent operation it works
If I use BMT it works
I'm insisting on this approach because i want to control transaction by client, otherwise I would use a SIMPLE web service
CMT = Container Management Transaction = TransactionManagementType.CONTAINER
BMT = Bean Management Transaction = TransactionManagementType.BEAN
What I think is causing the problem:
I suspect MySql is crashing in commit / rollback (But i was tried with Derby and same problem happened)
A problem with XA MySql DataSource
MySql transaction support. I suspected that InnoDB engine would solve... I was wrong.
This question is connected with IBM BPM Advanced 8.0
I created Toolkit ODM Binbank Toolkit. This toolkit contain Advanced Integration Services. Name of the AIS is IServiceBR001ACT.
Then I attach this toolkit to Application "Collection" with short name ACOA and created process TestRule where I just call AIS IServiceBR001ACT.
Then I got exception.
---Error mssage:
javax.naming.ServiceUnavailableException: No synchronous endpoints are available for targeted SCA export/service: BIN_Collection_Toolkit_Implementation/IServiceBR001ACT [Root exception is javax.naming.NameNotFoundException: Context: sme-devNode04Cell/nodes/sme-devNode04/servers/server1, name: sca/ACOA-Tip-BIN_Collection_Toolkit_Implementation/export/IServiceBR001ACT: First component in name ACOA-Tip-BIN_Collection_Toolkit_Implementation/export/IServiceBR001ACT not found. [Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0]]
---Error details:
Process ID: Ref[65a79c75-9416-4204-aba4-299fb2366892/TWProcess.1d714b6a-6dd4-4fba-bab2-98f04dc01444]
Process GUID: guid:e51c9c5cfb9fe587:-3ed7be13:14f73fee28e:-3528
Error timestamp: Sep 4, 2015 1:00:00 AM
Instance ID: BPDInstance.14274
Task ID: Task.41016
Root snapshot ID: null
Snapshot ID: Snapshot.3d4f3c6e-c02b-4cae-be92-851d62ffdc18
Branch ID: null
---Error stack trace:
TestRule(Rule)#Snapshot.3d4f3c6e-c02b-4cae-be92-851d62ffdc18(tip)/BPD.bea9811b-01ac-49eb-af6d-b9732624f9bb
IServiceBR001ACT#Snapshot.0011b736-a14b-4bec-8db6-9f0ced5e3208/TWProcess.1d714b6a-6dd4-4fba-bab2-98f04dc01444
---Java stack trace:
com.lombardisoftware.component.common.workflow.WorkflowProcessItemException: javax.naming.ServiceUnavailableException: No synchronous endpoints are available for targeted SCA export/service: BIN_Collection_Toolkit_Implementation/IServiceBR001ACT [Root exception is javax.naming.NameNotFoundException: Context: sme-devNode04Cell/nodes/sme-devNode04/servers/server1, name: sca/ACOA-Tip-BIN_Collection_Toolkit_Implementation/export/IServiceBR001ACT: First component in name ACOA-Tip-BIN_Collection_Toolkit_Implementation/export/IServiceBR001ACT not found. [Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0]]
at com.lombardisoftware.component.common.workflow.ExecutionJob.doJob(ExecutionJob.java:421)
at com.lombardisoftware.server.ejb.workflow.EJBWorkflowManagerBean.doResumeWorkflowEngine(EJBWorkflowManagerBean.java:1236)
at com.lombardisoftware.server.ejb.workflow.EJBWorkflowManagerBean.resumeTask(EJBWorkflowManagerBean.java:347)
at com.lombardisoftware.server.ejb.workflow.EJBWorkflowManagerBean.resumeTask(EJBWorkflowManagerBean.java:311)
at com.lombardisoftware.server.ejb.workflow.EJSRemoteStatefulEJBWorkflowManager_82478d70.resumeTask(Unknown Source)
at com.lombardisoftware.server.ejb.workflow._EJBWorkflowManagerInterface_Stub.resumeTask(_EJBWorkflowManagerInterface_Stub.java:287)
at com.lombardisoftware.component.common.workflow.EJBWorkflowManagerDelegateDefault.resumeTask(EJBWorkflowManagerDelegateDefault.java:94)
at com.lombardisoftware.component.common.workflow.EJBWorkflowManagerDelegateWebSphere$4.run(EJBWorkflowManagerDelegateWebSphere.java:68)
at java.security.AccessController.doPrivileged(AccessController.java:327)
at com.lombardisoftware.client.delegate.common.WebsphereDelegateHelper.doAsCurrentSubjectContextSensitive(WebsphereDelegateHelper.java:197)
at com.lombardisoftware.client.delegate.common.WebsphereDelegateHelper.doAsCurrentSubjectContextSensitive(WebsphereDelegateHelper.java:181)
at com.lombardisoftware.component.common.workflow.EJBWorkflowManagerDelegateWebSphere.resumeTask(EJBWorkflowManagerDelegateWebSphere.java:66)
at com.lombardisoftware.bpd.runtime.engine.quartz.ExecuteSystemLaneActivityTask$1.run(ExecuteSystemLaneActivityTask.java:70)
at java.security.AccessController.doPrivileged(AccessController.java:362)
at javax.security.auth.Subject.doAs(Subject.java:573)
at com.ibm.websphere.security.auth.WSSubject.doAs(WSSubject.java:195)
at com.ibm.websphere.security.auth.WSSubject.doAs(WSSubject.java:152)
at com.lombardisoftware.client.delegate.common.WebsphereDelegateHelper.doAs(WebsphereDelegateHelper.java:172)
at com.lombardisoftware.client.delegate.common.WebsphereDelegateHelper$5.run(WebsphereDelegateHelper.java:139)
at java.security.AccessController.doPrivileged(AccessController.java:327)
at com.lombardisoftware.client.delegate.common.WebsphereDelegateHelper.doAs(WebsphereDelegateHelper.java:134)
at com.lombardisoftware.bpd.runtime.engine.quartz.ExecuteSystemLaneActivityTask.execute(ExecuteSystemLaneActivityTask.java:89)
at com.lombardisoftware.server.scheduler.Engine.execute(Engine.java:796)
at com.lombardisoftware.server.scheduler.Engine.access$300(Engine.java:78)
at com.lombardisoftware.server.scheduler.Engine$1.run(Engine.java:503)
at com.lombardisoftware.client.delegate.common.WebsphereDelegateHelper$3$1.run(WebsphereDelegateHelper.java:100)
at java.security.AccessController.doPrivileged(AccessController.java:362)
at javax.security.auth.Subject.doAs(Subject.java:573)
at com.ibm.websphere.security.auth.WSSubject.doAs(WSSubject.java:195)
at com.ibm.websphere.security.auth.WSSubject.doAs(WSSubject.java:152)
at com.lombardisoftware.client.delegate.common.WebsphereDelegateHelper.doAs(WebsphereDelegateHelper.java:172)
at com.lombardisoftware.client.delegate.common.WebsphereDelegateHelper$3.run(WebsphereDelegateHelper.java:96)
at com.lombardisoftware.server.scheduler.Utils$EJBThreadRootRunnable.executeRunnable(Utils.java:113)
at com.lombardisoftware.server.scheduler.ThreadPool$Worker.run(ThreadPool.java:194)
at java.lang.Thread.run(Thread.java:784)
Caused by: java.lang.RuntimeException: javax.naming.ServiceUnavailableException: No synchronous endpoints are available for targeted SCA export/service: BIN_Collection_Toolkit_Implementation/IServiceBR001ACT [Root exception is javax.naming.NameNotFoundException: Context: sme-devNode04Cell/nodes/sme-devNode04/servers/server1, name: sca/ACOA-Tip-BIN_Collection_Toolkit_Implementation/export/IServiceBR001ACT: First component in name ACOA-Tip-BIN_Collection_Toolkit_Implementation/export/IServiceBR001ACT not found. [Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0]]
at com.lombardisoftware.component.scaconnector.worker.SCAConnectorWorker$1.call(SCAConnectorWorker.java:253)
at com.lombardisoftware.component.scaconnector.worker.SCAConnectorWorker$1.call(SCAConnectorWorker.java:228)
at com.lombardisoftware.utility.spring.ProgrammaticTransactionSupport$1.doInTransaction(ProgrammaticTransactionSupport.java:409)
at org.springframework.transaction.jta.WebSphereUowTransactionManager$UOWActionAdapter.run(WebSphereUowTransactionManager.java:306)
at com.ibm.ws.uow.EmbeddableUOWManagerImpl.runUnderNewUOW(EmbeddableUOWManagerImpl.java:787)
at com.ibm.ws.uow.EmbeddableUOWManagerImpl.runUnderUOW(EmbeddableUOWManagerImpl.java:366)
at org.springframework.transaction.jta.WebSphereUowTransactionManager.execute(WebSphereUowTransactionManager.java:252)
at com.lombardisoftware.utility.spring.ProgrammaticTransactionSupport.executeInNewTransaction(ProgrammaticTransactionSupport.java:404)
at com.lombardisoftware.utility.spring.ProgrammaticTransactionSupport.execute(ProgrammaticTransactionSupport.java:267)
at com.lombardisoftware.utility.spring.ProgrammaticTransactionSupport.execute(ProgrammaticTransactionSupport.java:198)
at com.lombardisoftware.component.scaconnector.worker.SCAConnectorWorker.doJobProcessRequest(SCAConnectorWorker.java:228)
at com.lombardisoftware.component.scaconnector.worker.SCAConnectorWorker.doJob(SCAConnectorWorker.java:104)
at com.lombardisoftware.component.common.workflow.ExecutionJob.doJob(ExecutionJob.java:409)
... 34 more
Caused by: javax.naming.ServiceUnavailableException: No synchronous endpoints are available for targeted SCA export/service: BIN_Collection_Toolkit_Implementation/IServiceBR001ACT [Root exception is javax.naming.NameNotFoundException: Context: sme-devNode04Cell/nodes/sme-devNode04/servers/server1, name: sca/ACOA-Tip-BIN_Collection_Toolkit_Implementation/export/IServiceBR001ACT: First component in name ACOA-Tip-BIN_Collection_Toolkit_Implementation/export/IServiceBR001ACT not found. [Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0]]
at com.lombardisoftware.component.scaconnector.worker.SCAConnectorWorker$1.call(SCAConnectorWorker.java:250)
... 46 more
Caused by: javax.naming.NameNotFoundException: Context: sme-devNode04Cell/nodes/sme-devNode04/servers/server1, name: sca/ACOA-Tip-BIN_Collection_Toolkit_Implementation/export/IServiceBR001ACT: First component in name ACOA-Tip-BIN_Collection_Toolkit_Implementation/export/IServiceBR001ACT not found. [Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0]
at com.ibm.ws.naming.jndicos.CNContextImpl.mapNotFoundException(CNContextImpl.java:4564)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1822)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1777)
at com.ibm.ws.naming.jndicos.CNContextImpl.lookupExt(CNContextImpl.java:1434)
at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:616)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:165)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:179)
at org.apache.aries.jndi.DelegateContext.lookup(DelegateContext.java:161)
at javax.naming.InitialContext.lookup(InitialContext.java:436)
at com.ibm.ws.soa.sca.oasis.binding.sca.SCAReferenceBindingInvoker.doInvoke(SCAReferenceBindingInvoker.java:108)
at com.ibm.ws.soa.sca.oasis.binding.sca.SCAReferenceBindingInvoker.invoke(SCAReferenceBindingInvoker.java:85)
at org.apache.tuscany.sca.core.invocation.InterceptorAsyncImpl.invoke(InterceptorAsyncImpl.java:58)
at org.apache.tuscany.sca.core.invocation.InterceptorAsyncImpl.invoke(InterceptorAsyncImpl.java:58)
at org.apache.tuscany.sca.core.invocation.InterceptorAsyncImpl.invoke(InterceptorAsyncImpl.java:58)
at org.apache.tuscany.sca.core.invocation.RuntimeInvoker.invoke(RuntimeInvoker.java:125)
at org.apache.tuscany.sca.core.invocation.RuntimeInvoker.invoke(RuntimeInvoker.java:108)
at org.apache.tuscany.sca.core.invocation.RuntimeInvoker.invoke(RuntimeInvoker.java:91)
at org.apache.tuscany.sca.core.assembly.impl.RuntimeEndpointReferenceImpl.invoke(RuntimeEndpointReferenceImpl.java:238)
at com.ibm.bpm.sca.core.ReferenceInvoker.invokeCompleteMessage(ReferenceInvoker.java:87)
at com.lombardisoftware.component.scaconnector.worker.SCAConnectorWorker$1.call(SCAConnectorWorker.java:234)
... 46 more
Caused by: org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0
at com.ibm.ws.naming.ipcos.WsnOptimizedNamingImpl.handleNameNotFound(WsnOptimizedNamingImpl.java:2483)
at com.ibm.ws.naming.ipcos.WsnOptimizedNamingImpl.getNextWsnOptimizedNamingContext(WsnOptimizedNamingImpl.java:1254)
at com.ibm.ws.naming.cosbase.WsnOptimizedNamingImplBase$3.run(WsnOptimizedNamingImplBase.java:4623)
at com.ibm.ws.naming.cosbase.WsnOptimizedNamingImplBase$3.run(WsnOptimizedNamingImplBase.java:4618)
at com.ibm.ws.naming.util.CommonHelpers.retry(CommonHelpers.java:871)
at com.ibm.ws.naming.cosbase.WsnOptimizedNamingImplBase.getTargetContext(WsnOptimizedNamingImplBase.java:4617)
at com.ibm.ws.naming.cosbase.WsnOptimizedNamingImplBase$LeafOperationData.<init>(WsnOptimizedNamingImplBase.java:5229)
at com.ibm.ws.naming.cosbase.WsnOptimizedNamingImplBase.resolve_complete_info(WsnOptimizedNamingImplBase.java:2160)
at com.ibm.WsnOptimizedNaming._NamingContextStub.resolve_complete_info(_NamingContextStub.java:538)
at com.ibm.ws.naming.jndicos.CNContextImpl$2.run(CNContextImpl.java:2958)
at com.ibm.ws.naming.jndicos.CNContextImpl$2.run(CNContextImpl.java:2954)
at com.ibm.ws.naming.util.CommonHelpers.retry(CommonHelpers.java:871)
at com.ibm.ws.naming.jndicos.CNContextImpl.cosResolve(CNContextImpl.java:2952)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1818)
... 64 more
I checked websphere and found that here is not created sca component with proper naming.
How to solve this issue?
Should I do something with toolkit or should I point to toolkit properly inside of application?
This is just bug in IBM BPM.
I just removed and connect back toolkit.
And all is working properly.
Also possible another reason of that bug.
When we have project ExampleProject depend on toolkits A and B
and Both of toolkits A and B depend on another toolkit C, but they depend on different snapshot version.
In that situation websphere try to deploy snapshot but can't to do that with error code.
Caused by: com.ibm.bpm.fds.common.FDSException: Failed to process contribution dependency, ctrbDependencyId(false) = ContributionDependency.c63331fb-84a3-4207-9765-264e4ff4891b, libraryName(false) = CONSOLE_Business_Object_Toolkit_Library, contributionId(false) = Contribution.c1abb10c-334e-4e24-b581-680481515246, contributionRef(false) = null, deployWith(false) = true, guid(false) = guid:146778b866395858:-7560582:141a6a84e9b:-4ff5, versionId(false) = 6b739dd4-a735-4b8d-8647-c4118c3fe8d3, lastModified(false) = 2013-10-18 12:50:26.0, lastModifiedByUserId(false) = User.9, state = RECORD_STATE_UP_TO_DATE, saveSyncId = null
at com.ibm.bpm.fds.repo.adapter.JavaAdapter.processContributionDependencies(JavaAdapter.java:527)
at com.ibm.bpm.fds.repo.adapter.JavaAdapter.processContribution(JavaAdapter.java:341)
at com.ibm.bpm.fds.repo.adapter.JavaAdapter.processContributionDependencies(JavaAdapter.java:515)
at com.ibm.bpm.fds.repo.adapter.JavaAdapter.processContribution(JavaAdapter.java:341)
at com.ibm.bpm.fds.repo.adapter.JavaAdapter.buildDependencyTree(JavaAdapter.java:226)
… 16 more
Caused by: com.lombardisoftware.core.TeamWorksException: There are 3 contributions called CONSOLE_Business_Object_Toolkit_Library. Please fix the dependency tree from Console so that there is only 1.
at com.lombardisoftware.client.persistence.ContributionFactory.getContributionByName(ContributionFactory.java:188)
at com.lombardisoftware.client.persistence.ContributionFactory.getContributionByName(ContributionFactory.java:166)
at com.ibm.bpm.fds.repo.adapter.JavaAdapter.processContributionDependencies(JavaAdapter.java:495)
… 20 more
mode detailed this described here
https://bpmtricks.wordpress.com/2013/11/04/toolkit-version-problem/
I have a problem with this code:
GraphHopperAPI gh = new GraphHopperWeb();
gh.load("http://localhost:8989/api/route");
GHResponse ph = gh.route(new GHRequest(45.104546,7.69043,45.104546,7.69043));
It gives me this error:
2014-03-29 09:33:00,036 [main] INFO graphhopper.http.GraphHopperWeb - Full request took:0.037406, API took:0.0
Exception in thread "main" java.lang.RuntimeException: Problem while fetching path 45.104546, 7.69043->45.104546, 7.69043
at com.graphhopper.http.GraphHopperWeb.route(GraphHopperWeb.java:119)
at provaMain.main(provaMain.java:23)
Caused by: org.json.JSONException: A JSONObject text must begin with '{' at character 0
at org.json.JSONTokener.syntaxError(JSONTokener.java:410)
at org.json.JSONObject.<init>(JSONObject.java:179)
at org.json.JSONObject.<init>(JSONObject.java:402)
at com.graphhopper.http.GraphHopperWeb.route(GraphHopperWeb.java:95)
... 1 more
The documentation currently undergoes a change (moving it from wiki to source). Where did you find that snippet? Please try gh.load("http://localhost:8989/"); for the latest branch and gh.load("http://localhost:8989/api"); before.