I have these declarations:
declare Event
#role(event)
#timestamp(time)
//#expires(100ms)
//params : Map<String, Object>
param : long
time : long
end
declare Expectation
event: Event
state: int //-1 pending, 0 violated, 1 fulfilled
end
declare ExpectationLeftArmStr extends Expectation
end
And in a rule I've written:
ExpectationLeftArmStr exp = new ExpectationLeftArmStr();
exp.setEvent($ev);
exp.setState(-1);//pending
insert(exp);
And $ev is a correct Event that I use into a rule.
The error is: rec.dom.LeftArmStr cannot be cast to java.lang.Number where LeftArmStr is $ev.
Exception in thread "main" Exception executing consequence for rule "Operazions on LeftArmStr event 33399" in rec.dom: java.lang.ClassCastException: rec.dom.LeftArmStr cannot be cast to java.lang.Number
at org.drools.runtime.rule.impl.DefaultConsequenceExceptionHandler.handleException(DefaultConsequenceExceptionHandler.java:39)
at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1297)
at org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:1221)
at org.drools.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1456)
at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:710)
at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:674)
at org.drools.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:230)
at org.rec.Session.notify(Session.java:136)
at org.ece.reasoner.ReasonerECE.notifyEvent(ReasonerECE.java:73)
at org.ece.main.MainLaucher.main(MainLaucher.java:245)
Caused by: java.lang.ClassCastException: rec.dom.LeftArmStr cannot be cast to java.lang.Number
at org.drools.base.evaluators.BeforeEvaluatorDefinition$BeforeEvaluator.evaluateCachedRight(BeforeEvaluatorDefinition.java:306)
at org.drools.rule.constraint.EvaluatorConstraint.isAllowedCachedRight(EvaluatorConstraint.java:80)
at org.drools.common.SingleBetaConstraints.isAllowedCachedRight(SingleBetaConstraints.java:134)
at org.drools.reteoo.JoinNode.propagateFromRight(JoinNode.java:156)
at org.drools.reteoo.JoinNode.assertObject(JoinNode.java:148)
at org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:59)
at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:141)
at org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:59)
at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:235)
at org.drools.reteoo.EntryPointNode.assertObject(EntryPointNode.java:240)
at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:350)
at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:311)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:903)
at org.drools.base.DefaultKnowledgeHelper.insert(DefaultKnowledgeHelper.java:192)
at org.drools.base.DefaultKnowledgeHelper.insert(DefaultKnowledgeHelper.java:186)
at rec.dom.Rule_Operazions_on_LeftArmStr_event____33399_4678ddba7e884b11b1acf302cef8a05c.defaultConsequence(Rule_Operazions_on_LeftArmStr_event____33399_4678ddba7e884b11b1acf302cef8a05c.java:19)
at rec.dom.Rule_Operazions_on_LeftArmStr_event____33399_4678ddba7e884b11b1acf302cef8a05cDefaultConsequenceInvokerGenerated.evaluate(Unknown Source)
at rec.dom.Rule_Operazions_on_LeftArmStr_event____33399_4678ddba7e884b11b1acf302cef8a05cDefaultConsequenceInvoker.evaluate(Unknown Source)
at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1287)
... 8 more
Related
I tried to count event from KStream, into time period:
KStream<String, VehicleEventTO> stream = builder.stream("vehicle", Consumed.with(Serdes.String(), new JsonSerde<>(VehicleEventTO.class)));
KStream<String, VehicleEventTO> streamWithKey = stream.selectKey((key, value) -> value.getId_vehicle().toString());
KStream<String, Long> streamValueKey = streamWithKey.map((key, value) -> KeyValue.pair(key, value.getId_vehicle()));
streamValueKey.groupByKey()
.windowedBy(TimeWindows.of(Duration.ofMinutes(10).toMillis()))
.count(Materialized.with(Serdes.String(), new JsonSerde<>(Long.class)));
I've this exception:
Exception in thread
"test-app-87ce164d-c427-4dcf-aa76-aeeb6f8fc943-StreamThread-1"
org.apache.kafka.streams.errors.StreamsException: Exception caught in
process. taskId=0_0, processor=KSTREAM-SOURCE-0000000000,
topic=vehicle, partition=0, offset=160385 at
org.apache.kafka.streams.processor.internals.StreamTask.process(StreamTask.java:318)
at
org.apache.kafka.streams.processor.internals.AssignedStreamsTasks.process(AssignedStreamsTasks.java:94)
at
org.apache.kafka.streams.processor.internals.TaskManager.process(TaskManager.java:409)
at
org.apache.kafka.streams.processor.internals.StreamThread.processAndMaybeCommit(StreamThread.java:964)
at
org.apache.kafka.streams.processor.internals.StreamThread.runOnce(StreamThread.java:832)
at
org.apache.kafka.streams.processor.internals.StreamThread.runLoop(StreamThread.java:767)
at
org.apache.kafka.streams.processor.internals.StreamThread.run(StreamThread.java:736)
Caused by: org.apache.kafka.streams.errors.StreamsException: A
serializer (key:
org.apache.kafka.common.serialization.ByteArraySerializer / value:
org.apache.kafka.common.serialization.ByteArraySerializer) is not
compatible to the actual key or value type (key type: java.lang.String
/ value type: java.lang.Long). Change the default Serdes in
StreamConfig or provide correct Serdes via method parameters.
groupByKey() makes use of the default serialisers:
groupByKey()
Group the records by their current key into a
KGroupedStream while preserving the original values and default
serializers and deserializers.
You either have to use groupByKey(Serialized<K,V> serialized) or groupByKey(Grouped<K,V> grouped).
The following should do the trick:
streamValueKey.groupByKey(Serialized.with(Serdes.String(), Serdes.Long()))
.windowedBy(TimeWindows.of(Duration.ofMinutes(10).toMillis()))
.count(Materialized.with(Serdes.String(), new JsonSerde<>(Long.class)));
I'm trying to get a specific getter of a property in kotlin to be based on the value of the enum it is called from. This is what I got so far:
enum class Endpoint {
EVENTS, GAMES;
val baseUrl = "https://www.example.com/api"
val path: String
get() = when(this){
EVENTS -> "$baseUrl/events"
GAMES -> "$baseUrl/games"
}
}
Called like this:
print(Endpoint.EVENTS.path)
While this compiles without any problem, as soon as I run it I get a NullPointerException with the error Attempt to invoke virtual method 'java.lang.Object [...].Endpoint[].clone()' on a null object reference
I'm not sure what I'm doing wrong or what the proper way to accomplish what is stated above is.
EDIT: Full log of the exception:
05-09 22:51:33.793 15673-15673/com.filippovigani.eventvods E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.filippovigani.eventvods, PID: 15673
java.lang.ExceptionInInitializerError
at com.filippovigani.eventvods.networking.Endpoint.getPath(Endpoint.kt:21)
at com.filippovigani.eventvods.networking.Endpoint.<init>(Endpoint.kt:25)
at com.filippovigani.eventvods.networking.Endpoint.<clinit>(Endpoint.kt)
at com.filippovigani.eventvods.networking.EventvodsApi$Companion.getEvents(EventvodsApi.kt:8)
at com.filippovigani.eventvods.MainActivity.onCreate(MainActivity.kt:19)
at android.app.Activity.performCreate(Activity.java:5990)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387)
at android.app.ActivityThread.access$800(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object com.filippovigani.eventvods.networking.Endpoint[].clone()' on a null object reference
at com.filippovigani.eventvods.networking.Endpoint.values(Endpoint.kt)
at com.filippovigani.eventvods.networking.Endpoint$WhenMappings.<clinit>(Unknown Source)
at com.filippovigani.eventvods.networking.Endpoint.getPath(Endpoint.kt:21)
at com.filippovigani.eventvods.networking.Endpoint.<init>(Endpoint.kt:25)
at com.filippovigani.eventvods.networking.Endpoint.<clinit>(Endpoint.kt)
at com.filippovigani.eventvods.networking.EventvodsApi$Companion.getEvents(EventvodsApi.kt:8)
at com.filippovigani.eventvods.MainActivity.onCreate(MainActivity.kt:19)
at android.app.Activity.performCreate(Activity.java:5990)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387)
at android.app.ActivityThread.access$800(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
I can't reproduce your error, the code works fine. Nevertheless, I think the solution is a bit too complex, why don't you use a constructor argument to provide the constant-specific value:
enum class Endpoint(service: String) {
EVENTS("/events"), GAMES("/games");
private val baseUrl = "https://www.example.com/api"
val path: String = baseUrl + service
}
The exception indicates you're trying to access path within the constructor of the enum. This causes a problem because the enum is not yet ready for use during construction.
This means the following chain of calls results in failure:
Init Endpoint
Init Endpoint.EVENTS
Call to Endpoint.getPath() (This does not show in your code)
Uses Endpoint$WhenMapping, begin init of that class.
Endpoint$WhenMapping uses EndPoint.values(), but since we're still initializing the instances of the enum, the values array cannot be provided, returning null.
To ensure it is not modified, WhenMapping clones and caches the array, but since the array is null when it never should be outside of initialization this causes the NPE.
Simply put your code somehow relies on a class that requires itself to be fully initialized to use. Since your code does not display how you're calling Endpoint.EVENTS.path this is all that can be said about it.
Errors while testing simple BPEL component in isolation #wid 7.0.0.4
BPEL component has only one Java snippet containing a single line:
System.out.println("+++++++++++++++++" + input1);
At the same time, the Java components are working fine.
My configuration is follows:
Ubuntu 12.10
WID 7.0.0.4
WPS 7
[5/21/13 10:42:25:111 MSD] 0000024f HTM I CWTKE0044I: Originator becomes administrator of task Component1. Usually this happens, because no people assignment criteria is defined for the administrators of the task, or because its usage returns an empty set of users.
[5/21/13 10:42:26:215 MSD] 00000222 cem W com.ibm.websphere.cem getEmitterFactory CEMEM0003E: The specified emitter factory was not found in JNDI. {0}
[5/21/13 10:42:26:216 MSD] 00000222 LocalExceptio E CNTR0020E: EJB threw an unexpected (non-declared) exception during invocation of method "invokeProcessSessionBean" on bean "BeanId(BPEContainer_qnode_server1#bpecontainer.jar#CScopeProvider, null)". Exception data: com.ibm.bpe.api.UnexpectedFailureException: CWWBA0010E: Unexpected exception during execution.
com.ibm.bpe.api.EngineStateObserverEventError: CWWBE0013E: An error occurred during the event handling of 'activityStarted' in the observer plug-in type 'com.ibm.bpe.engine.observer.CEMStateObserverPlugin'.
com.ibm.websphere.cem.exception.EmitterFactoryCreationException: CEMEM0003E: The specified emitter factory was not found in JNDI. javax.naming.NameNotFoundException: Context: qcell/nodes/qnode/servers/server1, name: com/ibm/events/configuration/emitter/Default: First component in name events/configuration/emitter/Default not found. [Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0]
javax.naming.NameNotFoundException: Context: qcell/nodes/qnode/servers/server1, name: com/ibm/events/configuration/emitter/Default: First component in name events/configuration/emitter/Default not found.
org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0
at com.ibm.ws.naming.ipcos.WsnOptimizedNamingImpl.handleNameNotFound(WsnOptimizedNamingImpl.java:2519)
at com.ibm.ws.naming.ipcos.WsnOptimizedNamingImpl.getNextWsnOptimizedNamingContext(WsnOptimizedNamingImpl.java:1270)
at com.ibm.ws.naming.cosbase.WsnOptimizedNamingImplBase$3.run(WsnOptimizedNamingImplBase.java:4738)
at com.ibm.ws.naming.cosbase.WsnOptimizedNamingImplBase$3.run(WsnOptimizedNamingImplBase.java:4733)
at com.ibm.ws.naming.util.CommonHelpers.retry(CommonHelpers.java:771)
at com.ibm.ws.naming.cosbase.WsnOptimizedNamingImplBase.getTargetContext(WsnOptimizedNamingImplBase.java:4732)
at com.ibm.ws.naming.cosbase.WsnOptimizedNamingImplBase$LeafOperationData.<init>(WsnOptimizedNamingImplBase.java:5311)
at com.ibm.ws.naming.cosbase.WsnOptimizedNamingImplBase.resolve_complete_info(WsnOptimizedNamingImplBase.java:2155)
at com.ibm.WsnOptimizedNaming._NamingContextStub.resolve_complete_info(_NamingContextStub.java:538)
at com.ibm.ws.naming.jndicos.CNContextImpl$2.run(CNContextImpl.java:2809)
at com.ibm.ws.naming.jndicos.CNContextImpl$2.run(CNContextImpl.java:2805)
at com.ibm.ws.naming.util.CommonHelpers.retry(CommonHelpers.java:771)
at com.ibm.ws.naming.jndicos.CNContextImpl.cosResolve(CNContextImpl.java:2803)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1802)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1761)
at com.ibm.ws.naming.jndicos.CNContextImpl.lookupExt(CNContextImpl.java:1512)
at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:644)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:166)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:180)
at javax.naming.InitialContext.lookup(InitialContext.java:436)
at com.ibm.websphere.cem.ECSEmitter$5.run(ECSEmitter.java:825)
at java.security.AccessController.doPrivileged(AccessController.java:202)
at com.ibm.websphere.cem.ECSEmitter.getEmitterFactory(ECSEmitter.java:822)
at com.ibm.websphere.cem.ECSEmitter.getEmitter(ECSEmitter.java:905)
at com.ibm.websphere.cem.ECSEmitter.<init>(ECSEmitter.java:138)
at com.ibm.ws.monitoring.core.cei.ECSAccess.getECSEmitter(ECSAccess.java:108)
at com.ibm.ws.monitoring.core.BaseMonitor.getECSEmitter(BaseMonitor.java:334)
at com.ibm.bpe.monitor.MonitoredComponent.getECSEmitter(MonitoredComponent.java:248)
at com.ibm.bpe.engine.observer.EventHelper.getECSEmitter(EventHelper.java:107)
at com.ibm.bpe.engine.observer.ActivityInstanceEventTypeHandler.processBPELEvent(ActivityInstanceEventTypeHandler.java:1880)
at com.ibm.bpe.engine.observer.CEMSOPContextRestored.activityInstanceEvent(CEMSOPContextRestored.java:170)
at com.ibm.bpe.engine.observer.BpelStateObserverContextImpl.restoreContextAndFireActivityInstanceEvent(BpelStateObserverContextImpl.java:1455)
at com.ibm.bpe.engine.observer.CEMStateObserverPlugin.activityInstanceEvent(CEMStateObserverPlugin.java:444)
at com.ibm.bpe.engine.observer.BpelStateObserver.observe(BpelStateObserver.java:1562)
at com.ibm.bpe.engine.observer.BpelStateObserver.observeOrDelay(BpelStateObserver.java:1525)
at com.ibm.bpe.engine.observer.BpelStateObserver.activityStarted(BpelStateObserver.java:86)
at com.ibm.bpe.engine.BpelActivityState.setActivityState(BpelActivityState.java:469)
at com.ibm.bpe.engine.BpelActivityState.setActivityState(BpelActivityState.java:593)
at com.ibm.bpe.engine.BpelActivityState.setActivityState(BpelActivityState.java:117)
at com.ibm.bpe.engine.BpelActivityState.setActivityState(BpelActivityState.java:99)
at com.ibm.bpe.engine.BpelActivityKindScript.doActivate(BpelActivityKindScript.java:70)
at com.ibm.bpe.engine.BpelActivityStateInactive.activateOrSkip(BpelActivityStateInactive.java:280)
at com.ibm.bpe.engine.BpelEngineCore.continueControlLink(BpelEngineCore.java:291)
at com.ibm.bpe.engine.BpelContinueLinkMessage3.execute(BpelContinueLinkMessage3.java:88)
at com.ibm.bpe.engine.BpelEngine.onMessage(BpelEngine.java:1536)
at com.ibm.bpe.framework.GenericAPIServicesImpl$7.run(GenericAPIServicesImpl.java:440)
at com.ibm.bpe.framework.infrastructure.InfrastructureServicesSupportBean.runInCScopeTxClassLoaderContextsWithException(InfrastructureServicesSupportBean.java:167)
at com.ibm.bpe.framework.infrastructure.EJSLocalStatelessInfrastructureServicesSupportBea_70e9f9d4.runInCScopeTxClassLoaderContextsWithException(Unknown Source)
at com.ibm.bpe.framework.infrastructure.InfrastructureServicesImpl.runInCScopeTxClassLoaderContextsWithException(InfrastructureServicesImpl.java:350)
at com.ibm.bpe.framework.infrastructure.InfrastructureServicesImpl$2.run(InfrastructureServicesImpl.java:251)
at com.ibm.bpe.framework.sca.AbstractBPCImplementationHandler.handleInvocationEnvironmentRequest(AbstractBPCImplementationHandler.java:197)
at com.ibm.bpe.framework.sca.AbstractBPCImplementationHandler.processMessage(AbstractBPCImplementationHandler.java:130)
at com.ibm.ws.sca.internal.message.impl.MessageDispatcherImpl.processMessageWithPCI(MessageDispatcherImpl.java:755)
at com.ibm.ws.sca.internal.message.impl.MessageDispatcherImpl.processMessage(MessageDispatcherImpl.java:1607)
at com.ibm.ws.sca.internal.message.impl.ManagedMessageImpl.process(ManagedMessageImpl.java:980)
at com.ibm.ws.sca.internal.webmodule.handler.WebModuleContextSwitchHandler.processMessage(WebModuleContextSwitchHandler.java:146)
at com.ibm.ws.sca.internal.message.impl.MessageDispatcherImpl.processMessageWithPCI(MessageDispatcherImpl.java:766)
at com.ibm.ws.sca.internal.message.impl.MessageDispatcherImpl.processMessage(MessageDispatcherImpl.java:1607)
at com.ibm.ws.sca.internal.proxy.impl.ProxyInvocationHandlerImpl.invoke(ProxyInvocationHandlerImpl.java:783)
at $Proxy78.processMessage(Unknown Source)
at com.ibm.bpe.framework.sca.InvocationEnvironmentProviderImpl.runInInvocationEnvironment(InvocationEnvironmentProviderImpl.java:158)
at com.ibm.bpe.framework.infrastructure.InfrastructureServicesImpl.runInScaCScopeTxClassLoaderContextsWithException(InfrastructureServicesImpl.java:257)
at com.ibm.bpe.framework.GenericAPIServicesImpl.bpc_onMessage(GenericAPIServicesImpl.java:427)
at com.ibm.bpe.framework.navigation.CScopeProviderBean$1.run(CScopeProviderBean.java:168)
at java.security.AccessController.doPrivileged(AccessController.java:202)
at com.ibm.bpe.framework.navigation.CScopeProviderBean.invokeProcessSessionBean(CScopeProviderBean.java:165)
at com.ibm.bpe.framework.navigation.EJSLocalStatelessCScopeProvider_19c383f5.invokeProcessSessionBean(Unknown Source)
at com.ibm.bpe.framework.navigation.NavigationWorkObject4ContextSwitch.processV6EngineMessage(NavigationWorkObject4ContextSwitch.java:409)
at com.ibm.bpe.framework.navigation.NavigationWorkObject4ContextSwitch.processNextMessage(NavigationWorkObject4ContextSwitch.java:302)
at com.ibm.bpe.framework.navigation.NavigationWorkObject4ContextSwitch.run(NavigationWorkObject4ContextSwitch.java:142)
at com.ibm.ws.asynchbeans.J2EEContext$RunProxy.run(J2EEContext.java:268)
at java.security.AccessController.doPrivileged(AccessController.java:202)
at com.ibm.ws.asynchbeans.J2EEContext.run(J2EEContext.java:768)
at com.ibm.ws.asynchbeans.ExecutionContextImpl.go(ExecutionContextImpl.java:86)
at com.ibm.bpe.framework.ProcessExecutionContextImpl$2.run(ProcessExecutionContextImpl.java:169)
at java.security.AccessController.doPrivileged(AccessController.java:251)
at com.ibm.bpe.framework.ProcessExecutionContextImpl.go(ProcessExecutionContextImpl.java:159)
at com.ibm.bpe.framework.navigation.ProcessNavigationBean.processNextMessage(ProcessNavigationBean.java:345)
at com.ibm.bpe.framework.navigation.EJSLocalStatelessProcessNavigation_0f2917d9.processNextMessage(Unknown Source)
at com.ibm.bpe.framework.navigation.NavigationWorkObject4WorkMgrThread.run(NavigationWorkObject4WorkMgrThread.java:103)
at com.ibm.ws.asynchbeans.J2EEContext$RunProxy.run(J2EEContext.java:268)
at java.security.AccessController.doPrivileged(AccessController.java:224)
at javax.security.auth.Subject.doAs(Subject.java:495)
at com.ibm.websphere.security.auth.WSSubject.doAs(WSSubject.java:131)
at com.ibm.websphere.security.auth.WSSubject.doAs(WSSubject.java:89)
at com.ibm.ws.asynchbeans.J2EEContext$DoAsProxy.run(J2EEContext.java:335)
at java.security.AccessController.doPrivileged(AccessController.java:251)
at com.ibm.ws.asynchbeans.J2EEContext.run(J2EEContext.java:777)
at com.ibm.ws.asynchbeans.WorkWithExecutionContextImpl.go(WorkWithExecutionContextImpl.java:222)
at com.ibm.ws.asynchbeans.ABWorkItemImpl.run(ABWorkItemImpl.java:159)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1604)
[5/21/13 10:42:26:241 MSD] 00000222 cem W com.ibm.websphere.cem getEmitterFactory CEMEM0003E: The specified emitter factory was not found in JNDI. {0}
[5/21/13 10:42:26:242 MSD] 00000222 LocalExceptio E CNTR0020E: EJB threw an unexpected (non-declared) exception during invocation of method "invokeProcessSessionBean" on bean "BeanId(BPEContainer_qnode_server1#bpecontainer.jar#CScopeProvider, null)". Exception data: com.ibm.bpe.api.UnexpectedFailureException: CWWBA0010E: Unexpected exception during execution.
com.ibm.bpe.api.EngineStateObserverEventError: CWWBE0013E: An error occurred during the event handling of 'activityStarted' in the observer plug-in type 'com.ibm.bpe.engine.observer.CEMStateObserverPlugin'.
com.ibm.websphere.cem.exception.EmitterFactoryCreationException: CEMEM0003E: The specified emitter factory was not found in JNDI. javax.naming.NameNotFoundException: Context: qcell/nodes/qnode/servers/server1, name: com/ibm/events/configuration/emitter/Default: First component in name events/configuration/emitter/Default not found. [Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0]
javax.naming.NameNotFoundException: Context: qcell/nodes/qnode/servers/server1, name: com/ibm/events/configuration/emitter/Default: First component in name events/configuration/emitter/Default not found.
org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0
at com.ibm.ws.naming.ipcos.WsnOptimizedNamingImpl.handleNameNotFound(WsnOptimizedNamingImpl.java:2519)
at com.ibm.ws.naming.ipcos.WsnOptimizedNamingImpl.getNextWsnOptimizedNamingContext(WsnOptimizedNamingImpl.java:1270)
at com.ibm.ws.naming.cosbase.WsnOptimizedNamingImplBase$3.run(WsnOptimizedNamingImplBase.java:4738)
at com.ibm.ws.naming.cosbase.WsnOptimizedNamingImplBase$3.run(WsnOptimizedNamingImplBase.java:4733)
at com.ibm.ws.naming.util.CommonHelpers.retry(CommonHelpers.java:771)
at com.ibm.ws.naming.cosbase.WsnOptimizedNamingImplBase.getTargetContext(WsnOptimizedNamingImplBase.java:4732)
at com.ibm.ws.naming.cosbase.WsnOptimizedNamingImplBase$LeafOperationData.<init>(WsnOptimizedNamingImplBase.java:5311)
at com.ibm.ws.naming.cosbase.WsnOptimizedNamingImplBase.resolve_complete_info(WsnOptimizedNamingImplBase.java:2155)
at com.ibm.WsnOptimizedNaming._NamingContextStub.resolve_complete_info(_NamingContextStub.java:538)
at com.ibm.ws.naming.jndicos.CNContextImpl$2.run(CNContextImpl.java:2809)
at com.ibm.ws.naming.jndicos.CNContextImpl$2.run(CNContextImpl.java:2805)
at com.ibm.ws.naming.util.CommonHelpers.retry(CommonHelpers.java:771)
at com.ibm.ws.naming.jndicos.CNContextImpl.cosResolve(CNContextImpl.java:2803)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1802)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1761)
at com.ibm.ws.naming.jndicos.CNContextImpl.lookupExt(CNContextImpl.java:1512)
at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:644)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:166)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:180)
at javax.naming.InitialContext.lookup(InitialContext.java:436)
at com.ibm.websphere.cem.ECSEmitter$5.run(ECSEmitter.java:825)
at java.security.AccessController.doPrivileged(AccessController.java:202)
at com.ibm.websphere.cem.ECSEmitter.getEmitterFactory(ECSEmitter.java:822)
at com.ibm.websphere.cem.ECSEmitter.getEmitter(ECSEmitter.java:905)
at com.ibm.websphere.cem.ECSEmitter.<init>(ECSEmitter.java:138)
at com.ibm.ws.monitoring.core.cei.ECSAccess.getECSEmitter(ECSAccess.java:108)
at com.ibm.ws.monitoring.core.BaseMonitor.getECSEmitter(BaseMonitor.java:334)
at com.ibm.bpe.monitor.MonitoredComponent.getECSEmitter(MonitoredComponent.java:248)
at com.ibm.bpe.engine.observer.EventHelper.getECSEmitter(EventHelper.java:107)
at com.ibm.bpe.engine.observer.ActivityInstanceEventTypeHandler.processBPELEvent(ActivityInstanceEventTypeHandler.java:1880)
at com.ibm.bpe.engine.observer.CEMSOPContextRestored.activityInstanceEvent(CEMSOPContextRestored.java:170)
at com.ibm.bpe.engine.observer.BpelStateObserverContextImpl.restoreContextAndFireActivityInstanceEvent(BpelStateObserverContextImpl.java:1455)
at com.ibm.bpe.engine.observer.CEMStateObserverPlugin.activityInstanceEvent(CEMStateObserverPlugin.java:444)
at com.ibm.bpe.engine.observer.BpelStateObserver.observe(BpelStateObserver.java:1562)
at com.ibm.bpe.engine.observer.BpelStateObserver.observeOrDelay(BpelStateObserver.java:1525)
at com.ibm.bpe.engine.observer.BpelStateObserver.activityStarted(BpelStateObserver.java:86)
at com.ibm.bpe.engine.BpelActivityState.setActivityState(BpelActivityState.java:469)
at com.ibm.bpe.engine.BpelActivityState.setActivityState(BpelActivityState.java:593)
at com.ibm.bpe.engine.BpelActivityState.setActivityState(BpelActivityState.java:117)
at com.ibm.bpe.engine.BpelActivityState.setActivityState(BpelActivityState.java:99)
at com.ibm.bpe.engine.BpelActivityKindScript.doActivate(BpelActivityKindScript.java:70)
at com.ibm.bpe.engine.BpelActivityStateInactive.activateOrSkip(BpelActivityStateInactive.java:280)
at com.ibm.bpe.engine.BpelEngineCore.continueControlLink(BpelEngineCore.java:291)
at com.ibm.bpe.engine.BpelContinueLinkMessage3.execute(BpelContinueLinkMessage3.java:88)
at com.ibm.bpe.engine.BpelEngine.onMessage(BpelEngine.java:1536)
at com.ibm.bpe.framework.GenericAPIServicesImpl$7.run(GenericAPIServicesImpl.java:440)
at com.ibm.bpe.framework.infrastructure.InfrastructureServicesSupportBean.runInCScopeTxClassLoaderContextsWithException(InfrastructureServicesSupportBean.java:167)
at com.ibm.bpe.framework.infrastructure.EJSLocalStatelessInfrastructureServicesSupportBea_70e9f9d4.runInCScopeTxClassLoaderContextsWithException(Unknown Source)
at com.ibm.bpe.framework.infrastructure.InfrastructureServicesImpl.runInCScopeTxClassLoaderContextsWithException(InfrastructureServicesImpl.java:350)
at com.ibm.bpe.framework.infrastructure.InfrastructureServicesImpl$2.run(InfrastructureServicesImpl.java:251)
at com.ibm.bpe.framework.sca.AbstractBPCImplementationHandler.handleInvocationEnvironmentRequest(AbstractBPCImplementationHandler.java:197)
at com.ibm.bpe.framework.sca.AbstractBPCImplementationHandler.processMessage(AbstractBPCImplementationHandler.java:130)
at com.ibm.ws.sca.internal.message.impl.MessageDispatcherImpl.processMessageWithPCI(MessageDispatcherImpl.java:755)
at com.ibm.ws.sca.internal.message.impl.MessageDispatcherImpl.processMessage(MessageDispatcherImpl.java:1607)
at com.ibm.ws.sca.internal.message.impl.ManagedMessageImpl.process(ManagedMessageImpl.java:980)
at com.ibm.ws.sca.internal.webmodule.handler.WebModuleContextSwitchHandler.processMessage(WebModuleContextSwitchHandler.java:146)
at com.ibm.ws.sca.internal.message.impl.MessageDispatcherImpl.processMessageWithPCI(MessageDispatcherImpl.java:766)
at com.ibm.ws.sca.internal.message.impl.MessageDispatcherImpl.processMessage(MessageDispatcherImpl.java:1607)
at com.ibm.ws.sca.internal.proxy.impl.ProxyInvocationHandlerImpl.invoke(ProxyInvocationHandlerImpl.java:783)
at $Proxy78.processMessage(Unknown Source)
at com.ibm.bpe.framework.sca.InvocationEnvironmentProviderImpl.runInInvocationEnvironment(InvocationEnvironmentProviderImpl.java:158)
at com.ibm.bpe.framework.infrastructure.InfrastructureServicesImpl.runInScaCScopeTxClassLoaderContextsWithException(InfrastructureServicesImpl.java:257)
at com.ibm.bpe.framework.GenericAPIServicesImpl.bpc_onMessage(GenericAPIServicesImpl.java:427)
at com.ibm.bpe.framework.navigation.CScopeProviderBean$1.run(CScopeProviderBean.java:168)
at java.security.AccessController.doPrivileged(AccessController.java:202)
at com.ibm.bpe.framework.navigation.CScopeProviderBean.invokeProcessSessionBean(CScopeProviderBean.java:165)
at com.ibm.bpe.framework.navigation.EJSLocalStatelessCScopeProvider_19c383f5.invokeProcessSessionBean(Unknown Source)
at com.ibm.bpe.framework.navigation.NavigationWorkObject4ContextSwitch.processV6EngineMessage(NavigationWorkObject4ContextSwitch.java:409)
at com.ibm.bpe.framework.navigation.NavigationWorkObject4ContextSwitch.processNextMessage(NavigationWorkObject4ContextSwitch.java:302)
at com.ibm.bpe.framework.navigation.NavigationWorkObject4ContextSwitch.run(NavigationWorkObject4ContextSwitch.java:142)
at com.ibm.ws.asynchbeans.J2EEContext$RunProxy.run(J2EEContext.java:268)
at java.security.AccessController.doPrivileged(AccessController.java:202)
at com.ibm.ws.asynchbeans.J2EEContext.run(J2EEContext.java:768)
at com.ibm.ws.asynchbeans.ExecutionContextImpl.go(ExecutionContextImpl.java:86)
at com.ibm.bpe.framework.ProcessExecutionContextImpl$2.run(ProcessExecutionContextImpl.java:169)
at java.security.AccessController.doPrivileged(AccessController.java:251)
at com.ibm.bpe.framework.ProcessExecutionContextImpl.go(ProcessExecutionContextImpl.java:159)
at com.ibm.bpe.framework.navigation.ProcessNavigationBean.processNextMessage(ProcessNavigationBean.java:345)
at com.ibm.bpe.framework.navigation.EJSLocalStatelessProcessNavigation_0f2917d9.processNextMessage(Unknown Source)
at com.ibm.bpe.framework.navigation.NavigationWorkObject4WorkMgrThread.run(NavigationWorkObject4WorkMgrThread.java:103)
at com.ibm.ws.asynchbeans.J2EEContext$RunProxy.run(J2EEContext.java:268)
at java.security.AccessController.doPrivileged(AccessController.java:224)
at javax.security.auth.Subject.doAs(Subject.java:495)
at com.ibm.websphere.security.auth.WSSubject.doAs(WSSubject.java:131)
at com.ibm.websphere.security.auth.WSSubject.doAs(WSSubject.java:89)
at com.ibm.ws.asynchbeans.J2EEContext$DoAsProxy.run(J2EEContext.java:335)
at java.security.AccessController.doPrivileged(AccessController.java:251)
at com.ibm.ws.asynchbeans.J2EEContext.run(J2EEContext.java:777)
at com.ibm.ws.asynchbeans.WorkWithExecutionContextImpl.go(WorkWithExecutionContextImpl.java:222)
at com.ibm.ws.asynchbeans.ABWorkItemImpl.run(ABWorkItemImpl.java:159)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1604)
[5/21/13 10:42:26:266 MSD] 00000222 cem W com.ibm.websphere.cem getEmitterFactory CEMEM0003E: The specified emitter factory was not found in JNDI. {0}
[5/21/13 10:42:26:268 MSD] 00000222 LocalExceptio E CNTR0020E: EJB threw an unexpected (non-declared) exception during invocation of method "invokeProcessSessionBean" on bean "BeanId(BPEContainer_qnode_server1#bpecontainer.jar#CScopeProvider, null)". Exception data: com.ibm.bpe.api.UnexpectedFailureException: CWWBA0010E: Unexpected exception during execution.
com.ibm.bpe.api.EngineStateObserverEventError: CWWBE0013E: An error occurred during the event handling of 'activityStarted' in the observer plug-in type 'com.ibm.bpe.engine.observer.CEMStateObserverPlugin'.
com.ibm.websphere.cem.exception.EmitterFactoryCreationException: CEMEM0003E: The specified emitter factory was not found in JNDI. javax.naming.NameNotFoundException: Context: qcell/nodes/qnode/servers/server1, name: com/ibm/events/configuration/emitter/Default: First component in name events/configuration/emitter/Default not found. [Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0]
javax.naming.NameNotFoundException: Context: qcell/nodes/qnode/servers/server1, name: com/ibm/events/configuration/emitter/Default: First component in name events/configuration/emitter/Default not found.
org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0
at com.ibm.ws.naming.ipcos.WsnOptimizedNamingImpl.handleNameNotFound(WsnOptimizedNamingImpl.java:2519)
at com.ibm.ws.naming.ipcos.WsnOptimizedNamingImpl.getNextWsnOptimizedNamingContext(WsnOptimizedNamingImpl.java:1270)
at com.ibm.ws.naming.cosbase.WsnOptimizedNamingImplBase$3.run(WsnOptimizedNamingImplBase.java:4738)
at com.ibm.ws.naming.cosbase.WsnOptimizedNamingImplBase$3.run(WsnOptimizedNamingImplBase.java:4733)
at com.ibm.ws.naming.util.CommonHelpers.retry(CommonHelpers.java:771)
at com.ibm.ws.naming.cosbase.WsnOptimizedNamingImplBase.getTargetContext(WsnOptimizedNamingImplBase.java:4732)
at com.ibm.ws.naming.cosbase.WsnOptimizedNamingImplBase$LeafOperationData.<init>(WsnOptimizedNamingImplBase.java:5311)
at com.ibm.ws.naming.cosbase.WsnOptimizedNamingImplBase.resolve_complete_info(WsnOptimizedNamingImplBase.java:2155)
at com.ibm.WsnOptimizedNaming._NamingContextStub.resolve_complete_info(_NamingContextStub.java:538)
at com.ibm.ws.naming.jndicos.CNContextImpl$2.run(CNContextImpl.java:2809)
at com.ibm.ws.naming.jndicos.CNContextImpl$2.run(CNContextImpl.java:2805)
at com.ibm.ws.naming.util.CommonHelpers.retry(CommonHelpers.java:771)
at com.ibm.ws.naming.jndicos.CNContextImpl.cosResolve(CNContextImpl.java:2803)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1802)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1761)
at com.ibm.ws.naming.jndicos.CNContextImpl.lookupExt(CNContextImpl.java:1512)
at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:644)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:166)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:180)
at javax.naming.InitialContext.lookup(InitialContext.java:436)
at com.ibm.websphere.cem.ECSEmitter$5.run(ECSEmitter.java:825)
at java.security.AccessController.doPrivileged(AccessController.java:202)
at com.ibm.websphere.cem.ECSEmitter.getEmitterFactory(ECSEmitter.java:822)
at com.ibm.websphere.cem.ECSEmitter.getEmitter(ECSEmitter.java:905)
at com.ibm.websphere.cem.ECSEmitter.<init>(ECSEmitter.java:138)
at com.ibm.ws.monitoring.core.cei.ECSAccess.getECSEmitter(ECSAccess.java:108)
at com.ibm.ws.monitoring.core.BaseMonitor.getECSEmitter(BaseMonitor.java:334)
at com.ibm.bpe.monitor.MonitoredComponent.getECSEmitter(MonitoredComponent.java:248)
at com.ibm.bpe.engine.observer.EventHelper.getECSEmitter(EventHelper.java:107)
at com.ibm.bpe.engine.observer.ActivityInstanceEventTypeHandler.processBPELEvent(ActivityInstanceEventTypeHandler.java:1880)
at com.ibm.bpe.engine.observer.CEMSOPContextRestored.activityInstanceEvent(CEMSOPContextRestored.java:170)
at com.ibm.bpe.engine.observer.BpelStateObserverContextImpl.restoreContextAndFireActivityInstanceEvent(BpelStateObserverContextImpl.java:1455)
at com.ibm.bpe.engine.observer.CEMStateObserverPlugin.activityInstanceEvent(CEMStateObserverPlugin.java:444)
at com.ibm.bpe.engine.observer.BpelStateObserver.observe(BpelStateObserver.java:1562)
at com.ibm.bpe.engine.observer.BpelStateObserver.observeOrDelay(BpelStateObserver.java:1525)
at com.ibm.bpe.engine.observer.BpelStateObserver.activityStarted(BpelStateObserver.java:86)
at com.ibm.bpe.engine.BpelActivityState.setActivityState(BpelActivityState.java:469)
at com.ibm.bpe.engine.BpelActivityState.setActivityState(BpelActivityState.java:593)
at com.ibm.bpe.engine.BpelActivityState.setActivityState(BpelActivityState.java:117)
at com.ibm.bpe.engine.BpelActivityState.setActivityState(BpelActivityState.java:99)
at com.ibm.bpe.engine.BpelActivityKindScript.doActivate(BpelActivityKindScript.java:70)
at com.ibm.bpe.engine.BpelActivityStateInactive.activateOrSkip(BpelActivityStateInactive.java:280)
at com.ibm.bpe.engine.BpelEngineCore.continueControlLink(BpelEngineCore.java:291)
at com.ibm.bpe.engine.BpelContinueLinkMessage3.execute(BpelContinueLinkMessage3.java:88)
at com.ibm.bpe.engine.BpelEngine.onMessage(BpelEngine.java:1536)
at com.ibm.bpe.framework.GenericAPIServicesImpl$7.run(GenericAPIServicesImpl.java:440)
at com.ibm.bpe.framework.infrastructure.InfrastructureServicesSupportBean.runInCScopeTxClassLoaderContextsWithException(InfrastructureServicesSupportBean.java:167)
at com.ibm.bpe.framework.infrastructure.EJSLocalStatelessInfrastructureServicesSupportBea_70e9f9d4.runInCScopeTxClassLoaderContextsWithException(Unknown Source)
at com.ibm.bpe.framework.infrastructure.InfrastructureServicesImpl.runInCScopeTxClassLoaderContextsWithException(InfrastructureServicesImpl.java:350)
at com.ibm.bpe.framework.infrastructure.InfrastructureServicesImpl$2.run(InfrastructureServicesImpl.java:251)
at com.ibm.bpe.framework.sca.AbstractBPCImplementationHandler.handleInvocationEnvironmentRequest(AbstractBPCImplementationHandler.java:197)
at com.ibm.bpe.framework.sca.AbstractBPCImplementationHandler.processMessage(AbstractBPCImplementationHandler.java:130)
at com.ibm.ws.sca.internal.message.impl.MessageDispatcherImpl.processMessageWithPCI(MessageDispatcherImpl.java:755)
Full log is here: http://pastebin.com/7eerEcS0
It seems to be CEI configuration issue. You can disable all the CEI events and test it. Also uncheck default events if you have enabled events for the bpel under Event Monitor >> Global Event Settings?
Not sure what I've done, but all of a sudden I started getting the following error, when I'm trying to use any render size(800, 500, P2D); or P3D.
I'm using Processing 2.0b4
Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: jogamp.opengl.macosx.cgl.MacOSXOnscreenCGLDrawable cannot be cast to javax.media.opengl.GLFBODrawable
at processing.opengl.PGL$PGLListener.display(PGL.java:2454)
at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:373)
at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:358)
at javax.media.opengl.awt.GLCanvas$7.run(GLCanvas.java:983)
at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:655)
at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:594)
at javax.media.opengl.awt.GLCanvas$8.run(GLCanvas.java:996)
at javax.media.opengl.Threading.invoke(Threading.java:193)
at javax.media.opengl.awt.GLCanvas.display(GLCanvas.java:449)
at javax.media.opengl.awt.GLCanvas.paint(GLCanvas.java:499)
at sun.awt.RepaintArea.paintComponent(RepaintArea.java:276)
at sun.awt.RepaintArea.paint(RepaintArea.java:241)
at apple.awt.ComponentModel.handleEvent(ComponentModel.java:263)
at java.awt.Component.dispatchEventImpl(Component.java:4790)
at java.awt.Component.dispatchEvent(Component.java:4544)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:635)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Exception in thread "Animation Thread" java.lang.RuntimeException: java.lang.ClassCastException: jogamp.opengl.macosx.cgl.MacOSXOnscreenCGLDrawable cannot be cast to javax.media.opengl.GLFBODrawable
at jogamp.common.awt.AWTEDTExecutor.invoke(AWTEDTExecutor.java:58)
at jogamp.opengl.awt.AWTThreadingPlugin.invokeOnOpenGLThread(AWTThreadingPlugin.java:103)
at jogamp.opengl.ThreadingImpl.invokeOnOpenGLThread(ThreadingImpl.java:205)
at javax.media.opengl.Threading.invokeOnOpenGLThread(Threading.java:172)
at javax.media.opengl.Threading.invoke(Threading.java:191)
at javax.media.opengl.awt.GLCanvas.display(GLCanvas.java:449)
at processing.opengl.PGL.requestDraw(PGL.java:870)
at processing.opengl.PGraphicsOpenGL.requestDraw(PGraphicsOpenGL.java:1523)
at processing.core.PApplet.run(PApplet.java:2006)
at java.lang.Thread.run(Thread.java:637)
Caused by: java.lang.ClassCastException: jogamp.opengl.macosx.cgl.MacOSXOnscreenCGLDrawable cannot be cast to javax.media.opengl.GLFBODrawable
at processing.opengl.PGL$PGLListener.display(PGL.java:2454)
at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:373)
at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:358)
at javax.media.opengl.awt.GLCanvas$7.run(GLCanvas.java:983)
at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:655)
at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:594)
at javax.media.opengl.awt.GLCanvas$8.run(GLCanvas.java:996)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:633)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
P2D and P3D are changed to use OPENGL in Processing 2.0. There are a lot of bugs about that. So you should try the latest beta release.
You should try the latest processing release which is 3.3.3.
I'm currently testing the data access layer that I've created in spring (PersistenceContext is injected). So I have a stateless EJB that calls a service for example UserService, that inserts/delete/update data in the database.
The service works fine, I was able to insert database. But when I was testing and I input string value that is longer than the set length I got:
javax.transaction.RollbackException: Transaction marked for rollback.
WARNING: DTX5014: Caught exception in beforeCompletion() callback:
javax.persistence.PersistenceException: org.hibernate.exception.DataException: ERROR: value too long for type character varying(20)
Caused by: org.hibernate.exception.DataException: ERROR: value too long for type character varying(20)
Caused by: org.hibernate.exception.DataException: ERROR: value too long for type character varying(20)
My partial code:
#PersistenceContext
protected EntityManager entityManager;
try {
entityManager.persist(e);
} catch(Exception e) {
//log message here
}
Then I've tried everything to catch these errors but I was not able to. Any suggestion on how to resolve the issue?
Thanks,
czetsuya
I've used the following code to find out which error is thrown under your circumstances:
BEGIN;
CREATE TABLE t(v varchar(5));
DO $body$
BEGIN
INSERT INTO t VALUES ('1234567');
EXCEPTION WHEN OTHERS THEN
RAISE NOTICE '!!! %, %', SQLSTATE, SQLERRM;
END;$body$;
ROLLBACK;
You'll see, that error code is 22001, error is named string_data_right_truncation per PostrgeSQL's list of error codes.
I don't know how to catch this error in the Hibernate, but on the PL/pgSQL level you can do it using:
EXCEPTION WHEN SQLSTATE '22001' THEN
-- your code follows
END;
I hope this will help you.