BeanCreationException: could not create bean class for a LookupService [message #1852810] |
Sun, 05 June 2022 08:34 |
J D Messages: 102 Registered: February 2021 |
Senior Member |
|
|
Hi there everyone,
I have a curious problem. I've created a lookup service that is triggered by a smartfield on a form. When the form is displayed, the smartfield remains empty and turns red with the message "Treatment Error". When I look at the Eclipse IDE console, I see a BeanCreationException: could not create bean class message for my ContractTypeRestLookupService class.
The class is as detailed below:
public class ContractTypeRestLookupService extends AbstractRestClientHelper
implements IContractTypeRestLookupService {
protected static final String RESOURCE_PATH = "contrattype";
public static final Logger LOG = LoggerFactory.getLogger(ContractTypeRestLookupService.class);
// Fetch contract types from the REST server (TO DO!)
private List<? extends ILookupRow<Integer>> getContractType() {
ArrayList<ILookupRow<Integer>> rows = new ArrayList<>();
rows.add(new LookupRow<>(1, "Full time"));
rows.add(new LookupRow<>(2, "Part time"));
rows.add(new LookupRow<>(3, "Temporary"));
return rows;
}
@Override
public List<? extends ILookupRow<Integer>> getDataByKey(ILookupCall<Integer> call) {
return null;
}
@Override
public List<? extends ILookupRow<Integer>> getDataByText(ILookupCall<Integer> call) {
return null;
}
@Override
public List<? extends ILookupRow<Integer>> getDataByAll(ILookupCall<Integer> call) {
return getContractType();
}
@Override
public List<? extends ILookupRow<Integer>> getDataByRec(ILookupCall<Integer> call) {
return null;
}
}
This is the console listing with the exception message:
2022-06-05 10:19:14,688 ERROR [qtp634540230-22] org.eclipse.scout.rt.platform.exception.ExceptionHandler.handlePlatformException(ExceptionHandler.java:143) - - MDC[principal=jd, cid=Sp2zd9Dq3ak/21]
org.eclipse.scout.rt.platform.exception.BeanCreationException: Could not create bean [class org.eclipse.scout.apps.ygclient.server.integrationproject.contract.ContractTypeRestLookupService] [user=jd, service.name=org.eclipse.scout.apps.ygclient.shared.integrationproject.contract.IContractTypeRestLookupService, service.operation=getDataByAll]
at org.eclipse.scout.rt.platform.internal.BeanInstanceUtil.translateException(BeanInstanceUtil.java:171)
at org.eclipse.scout.rt.platform.internal.BeanInstanceUtil.createBean(BeanInstanceUtil.java:67)
at org.eclipse.scout.rt.platform.internal.BeanInstanceUtil.createBean(BeanInstanceUtil.java:59)
at org.eclipse.scout.rt.platform.internal.SingeltonBeanInstanceProducer.createInstance(SingeltonBeanInstanceProducer.java:235)
at org.eclipse.scout.rt.platform.internal.SingeltonBeanInstanceProducer.getOrCreateInstance(SingeltonBeanInstanceProducer.java:112)
at org.eclipse.scout.rt.platform.internal.SingeltonBeanInstanceProducer.lambda$0(SingeltonBeanInstanceProducer.java:95)
at org.eclipse.scout.rt.platform.internal.BeanInstanceUtil.createAndAssertNoCircularDependency(BeanInstanceUtil.java:149)
at org.eclipse.scout.rt.platform.internal.SingeltonBeanInstanceProducer.produce(SingeltonBeanInstanceProducer.java:95)
at org.eclipse.scout.rt.platform.internal.BeanImplementor.getInstance(BeanImplementor.java:98)
at org.eclipse.scout.rt.platform.BEANS.opt(BEANS.java:58)
at org.eclipse.scout.rt.server.ServiceOperationInvoker.getValidatedServiceAccess(ServiceOperationInvoker.java:133)
at org.eclipse.scout.rt.server.ServiceOperationInvoker.invokeInternal(ServiceOperationInvoker.java:95)
at org.eclipse.scout.rt.server.ServiceOperationInvoker.lambda$0(ServiceOperationInvoker.java:60)
at org.eclipse.scout.rt.platform.chain.callable.CallableChain$Chain.continueChain(CallableChain.java:227)
at org.eclipse.scout.rt.platform.transaction.TransactionProcessor.runTxRequiresNew(TransactionProcessor.java:113)
at org.eclipse.scout.rt.platform.transaction.TransactionProcessor.intercept(TransactionProcessor.java:76)
at org.eclipse.scout.rt.platform.chain.callable.CallableChain$Chain.continueChain(CallableChain.java:222)
at org.eclipse.scout.rt.platform.chain.callable.CallableChain.call(CallableChain.java:170)
at org.eclipse.scout.rt.platform.context.RunContext.call(RunContext.java:158)
at org.eclipse.scout.rt.server.ServiceOperationInvoker.invoke(ServiceOperationInvoker.java:60)
at org.eclipse.scout.rt.server.ServiceTunnelServlet.invokeService(ServiceTunnelServlet.java:249)
at org.eclipse.scout.rt.server.ServiceTunnelServlet.doPost(ServiceTunnelServlet.java:189)
at org.eclipse.scout.rt.server.ServiceTunnelServlet.lambda$2(ServiceTunnelServlet.java:132)
at org.eclipse.scout.rt.platform.util.concurrent.Callables.lambda$0(Callables.java:31)
at org.eclipse.scout.rt.platform.chain.callable.CallableChain$Chain.continueChain(CallableChain.java:227)
at org.eclipse.scout.rt.platform.transaction.TransactionProcessor.runTxRequiresNew(TransactionProcessor.java:113)
at org.eclipse.scout.rt.platform.transaction.TransactionProcessor.intercept(TransactionProcessor.java:76)
at org.eclipse.scout.rt.platform.chain.callable.CallableChain$Chain.continueChain(CallableChain.java:222)
at org.eclipse.scout.rt.platform.chain.callable.CallableChain.call(CallableChain.java:170)
at org.eclipse.scout.rt.platform.context.RunContext.call(RunContext.java:158)
at org.eclipse.scout.rt.platform.context.RunContext.run(RunContext.java:125)
at org.eclipse.scout.rt.server.ServiceTunnelServlet.doPost(ServiceTunnelServlet.java:130)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:517)
at org.eclipse.scout.rt.server.commons.servlet.AbstractHttpServlet.access$0(AbstractHttpServlet.java:1)
at org.eclipse.scout.rt.server.commons.servlet.AbstractHttpServlet.wrap(AbstractHttpServlet.java:49)
at org.eclipse.scout.rt.server.commons.servlet.AbstractHttpServlet.service(AbstractHttpServlet.java:38)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:584)
at org.eclipse.jetty.servlet.ServletHolder$NotAsync.service(ServletHolder.java:1419)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:764)
at org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1624)
at org.eclipse.scout.rt.server.commons.authentication.ServletFilterHelper.lambda$0(ServletFilterHelper.java:206)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/javax.security.auth.Subject.doAs(Subject.java:423)
at org.eclipse.scout.rt.server.commons.authentication.ServletFilterHelper.continueChainAsSubject(ServletFilterHelper.java:202)
at org.eclipse.scout.rt.server.commons.authentication.ServiceTunnelAccessTokenAccessController.handle(ServiceTunnelAccessTokenAccessController.java:74)
at org.eclipse.scout.apps.ygclient.server.ServerServletFilter.doFilter(ServerServletFilter.java:49)
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:210)
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1594)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:506)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:131)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:578)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:122)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:223)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1571)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:221)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1378)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:176)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:463)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1544)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:174)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1300)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:129)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:122)
at org.eclipse.jetty.server.Server.handle(Server.java:562)
at org.eclipse.jetty.server.HttpChannel.lambda$handle$0(HttpChannel.java:418)
at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:675)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:410)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:282)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:319)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:100)
at org.eclipse.jetty.io.SocketChannelEndPoint$1.run(SocketChannelEndPoint.java:101)
at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.runTask(AdaptiveExecutionStrategy.java:412)
at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.consumeTask(AdaptiveExecutionStrategy.java:381)
at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.tryProduce(AdaptiveExecutionStrategy.java:268)
at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.lambda$new$0(AdaptiveExecutionStrategy.java:138)
at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:407)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:894)
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1038)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: org.eclipse.scout.rt.platform.util.Assertions$AssertionException: Assertion error: no instance found for query: interface org.eclipse.scout.rt.rest.client.IRestClientConfigFactory
at org.eclipse.scout.rt.platform.util.Assertions.fail(Assertions.java:621)
at org.eclipse.scout.rt.platform.util.Assertions.assertNotNull(Assertions.java:87)
at org.eclipse.scout.rt.platform.BEANS.get(BEANS.java:42)
at org.eclipse.scout.rt.rest.client.AbstractRestClientHelper.createClientConfig(AbstractRestClientHelper.java:90)
at org.eclipse.scout.rt.rest.client.AbstractRestClientHelper.createClient(AbstractRestClientHelper.java:75)
at org.eclipse.scout.rt.rest.client.AbstractRestClientHelper.createClientSupplier(AbstractRestClientHelper.java:57)
at org.eclipse.scout.rt.rest.client.AbstractRestClientHelper.<init>(AbstractRestClientHelper.java:50)
at org.eclipse.scout.apps.ygclient.server.integrationproject.contract.ContractTypeRestLookupService.<init>(ContractTypeRestLookupService.java:15)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at org.eclipse.scout.rt.platform.internal.BeanInstanceUtil.createBean(BeanInstanceUtil.java:64)
... 77 common frames omitted
Can anyone please help me figure out what I'm doing wrong?
Thanks a lot for your kind assistance.
Cheers,
JD
[Updated on: Sun, 05 June 2022 08:56] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.04136 seconds