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/
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 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)
java code:
public class App {
public static void main(String[] args) throws Exception {
Act.start("Hello World Demo");
}
}
error message:
pid: 1
profile: dev
mode: DEV
zen: Namespaces are one honking great idea -- let's do more of those!
四月 14, 2017 11:27:11 上午 act.Act start
信息: loading application(s) ...
四月 14, 2017 11:27:11 上午 act.app.AppScanner scan
警告: . is not a valid app base
四月 14, 2017 11:27:11 上午 org.xnio.Xnio <clinit>
INFO: XNIO version 3.3.6.Final
四月 14, 2017 11:27:11 上午 org.xnio.nio.NioXnio <clinit>
INFO: XNIO NIO Implementation Version 3.3.6.Final
Exception in thread "main" org.osgl.exception.UnexpectedException: App not found. Please make sure your app start directory is correct
at act.Act.start(Act.java:328)
at act.Act.startApp(Act.java:290)
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 act.boot.app.RunApp.start(RunApp.java:84)
at act.Act.start(Act.java:631)
at search.doc.App.main(App.java:13)
==================================================
Compilation completed successfully, but run App error.
From: http://actframework.org/doc/faq
You need to update the Run configuration and make sure working directory is set correctly:
I am using "Spring-boot + Hibernate4 + mysql" for my application. As part of which I have a requirement where my sprint-boot app should be able to start even when database is down. Currently it gives the below exception when I try to start my spring boot app without DB being up.
I researched a lot and found out that this exception has to do with hibernate.temp.use_jdbc_metadata_defaults property.
I tried setting this in "application.yml" of spring boot but this property's value is not being reflected at runtime.
Exception Stack Trace:
2014-05-25 04:09:43.193 INFO 59755 --- [ main] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {4.0.4.Final}
2014-05-25 04:09:43.250 WARN 59755 --- [ main] o.h.e.jdbc.internal.JdbcServicesImpl : HHH000342: Could not obtain connection to query metadata : Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
2014-05-25 04:09:43.263 INFO 59755 --- [ main] o.apache.catalina.core.StandardService : Stopping service Tomcat
Error starting ApplicationContext. To display the auto-configuration report enabled debug logging (start with --debug)
Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfiguration.class]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1553)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:304)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:973)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:750)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:120)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:648)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:311)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:909)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:898)
at admin.Application.main(Application.java:36)
Caused by: org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set
at org.hibernate.engine.jdbc.dialect.internal.DialectFactoryImpl.determineDialect(DialectFactoryImpl.java:104)
at org.hibernate.engine.jdbc.dialect.internal.DialectFactoryImpl.buildDialect(DialectFactoryImpl.java:71)
at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:205)
at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:89)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:206)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:178)
at org.hibernate.cfg.Configuration.buildTypeRegistrations(Configuration.java:1885)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1843)
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:850)
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:843)
at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.withTccl(ClassLoaderServiceImpl.java:399)
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:842)
at org.hibernate.jpa.HibernatePersistenceProvider.createContainerEntityManagerFactory(HibernatePersistenceProvider.java:150)
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:336)
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:318)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1612)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1549)
... 15 more
application.yml:
spring:
jpa:
show-sql: true
hibernate:
ddl-auto: none
naming_strategy: org.hibernate.cfg.DefaultNamingStrategy
temp:
use_jdbc_metadata_defaults: false
It was indeed a tough nut to crack.
After lot and lot of research and actually debugging the spring-boot, spring, hibernate, tomcat pool, etc to get it done.
I do think that it will save lot of time for people trying to achieve this type of requirement.
Below are the settings required to achieve the following requirement
Spring boot apps will start fine even if DB is down or there is no DB.
Apps will pick up the connections on the fly as DB comes up which means there is no need to restart the web server or redeploy the apps.
There is no need to start the tomcat or redeploy the apps, if DB goes down from running state and comes up again.
application.yml :
spring:
datasource:
driverClassName: com.mysql.jdbc.Driver
url: jdbc:mysql://localhost:3306/schema
username: root
password: root
continueOnError: true
initialize: false
initialSize: 0
timeBetweenEvictionRunsMillis: 5000
minEvictableIdleTimeMillis: 5000
minIdle: 0
jpa:
show-sql: true
hibernate:
ddl-auto: none
naming_strategy: org.hibernate.cfg.DefaultNamingStrategy
properties:
hibernate:
dialect: org.hibernate.dialect.MySQL5Dialect
hbm2ddl:
auto: none
temp:
use_jdbc_metadata_defaults: false
I am answering here and will close the issue that you have cross-posted
Any "native" property of the JPA implementation (Hibernate) can be set using the spring.jpa.properties prefix as explained here
I haven't looked much further in the actual issue here but to answer this particular question, you can set that hibernate key as follows
spring.jpa.properties.hibernate.temp.use_jdbc_metadata_defaults
Adding this alone worked for me:
spring.jpa.properties.hibernate.dialect: org.hibernate.dialect.Oracle10gDialect
Just replace the last part with your database dialect.
The solution is really useful for me. Thanks
i used file "application.properties" includes following lines:
app.sqlhost=192.168.10.11
app.sqlport=3306
app.sqldatabase=logs
spring.main.web-application-type=none
# Datasource
spring.datasource.url=jdbc:mysql://${app.sqlhost}:${app.sqlport}/${app.sqldatabase}
spring.datasource.username=user
spring.datasource.password=password
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5Dialect
spring.jpa.properties.hibernate.hbm2dll.auto = none
spring.jpa.properties.hibernate.temp.use_jdbc_metadata_defaults = false
spring.datasource.continue-on-error=true
spring.datasource.initialization-mode=never
spring.datasource.hikari.connection-timeout=5000
spring.datasource.hikari.idle-timeout=600000
spring.datasource.hikari.max-lifetime=1800000
spring.datasource.hikari.initialization-fail-timeout= -1
spring.jpa.hibernate.use-new-id-generator-mappings=true
spring.jpa.hibernate.ddl-auto=none
spring.jpa.show-sql=true
spring.output.ansi.enabled=always
But, you can not use #Transactional annotation at class level
#Service
//#Transactional //do not use to touch the Repository
#EnableAsync
#Scope( proxyMode = ScopedProxyMode.TARGET_CLASS )
public class LogService {
.... }
#Async
#Transactional // you can use at function level
public void deleteLogs(){
logRepository.deleteAllBy ...
}
Add following config should be work:
spring.jpa.database-platform: org.hibernate.dialect.MySQL5Dialect
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.