Grailsflow seems to be broken (as of Jan 2010) with Grails 1.2 or above, in both 'demo' and the plug-in flavours. Is there anyone out there using it? Have moved code out of the plug-in into my BootStrap.groovy, so the app will start.
#see jcatalog forum post
But still need to work around or resolve the error in all views.
See stack trace below:
org.codehaus.groovy.grails.web.pages.exceptions.GroovyPagesException: Error processing GroovyPageView: Error executing tag : java.lang.NullPointerException: Cannot set property 'common' on null object at /Users/saleram/.grails/1.2.1/projects/dataentry/plugins/grailsflow-core-1.0-rc1/grails-app/views/process/list.gsp:20
at java.lang.Thread.run(Thread.java:613)
Caused by: org.codehaus.groovy.grails.web.taglib.exceptions.GrailsTagException: Error executing tag : java.lang.NullPointerException: Cannot set property 'common' on null object at /Users/saleram/.grails/1.2.1/projects/dataentry/plugins/grailsflow-core-1.0-rc1/grails-app/views/process/list.gsp:20
at Users_saleram__grails_1_2_1_projects_dataentry_plugins_grailsflow_core_1_0_rc1_grails_app_views_process_list_gsp$_run_closure1.doCall(Users_saleram__grails_1_2_1_projects_dataentry_plugins_grailsflow_core_1_0_rc1_grails_app_views_process_list_gsp:27)
at Users_saleram__grails_1_2_1_projects_dataentry_plugins_grailsflow_core_1_0_rc1_grails_app_views_process_list_gsp$_run_closure1.doCall(Users_saleram__grails_1_2_1_projects_dataentry_plugins_grailsflow_core_1_0_rc1_grails_app_views_process_list_gsp)
at Users_saleram__grails_1_2_1_projects_dataentry_plugins_grailsflow_core_1_0_rc1_grails_app_views_process_list_gsp.run(Users_saleram__grails_1_2_1_projects_dataentry_plugins_grailsflow_core_1_0_rc1_grails_app_views_process_list_gsp:41)
... 1 more
Caused by: org.codehaus.groovy.runtime.InvokerInvocationException: java.lang.NullPointerException: Cannot set property 'common' on null object
... 4 more
Caused by: java.lang.NullPointerException: Cannot set property 'common' on null object
at GrailsflowI18nTagLib$_closure1.doCall(GrailsflowI18nTagLib.groovy:30)
... 4 more
The error is because it is unable to load the resource bundles for the messages. I moved them out into the default messages.properties file and modified the GSP's accordingly. Now the application starts fine and I can access the pages fine but there are still some errors as below..
Caused by: org.springframework.scheduling.quartz.JobMethodInvocationFailedException: Invocation of method 'execute' on target class [class NodeActivatorJob] failed; nested exception is groovy.lang.MissingPropertyException: No such property: updateProcessService for class: ProcessManagerService
at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:273)
at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
... 1 more
Caused by: groovy.lang.MissingPropertyException: No such property: updateProcessService for class: ProcessManagerService
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:49)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassGetPropertySite.getProperty(PogoMetaClassGetPropertySite.java:50)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGroovyObjectGetProperty(AbstractCallSite.java:241)
at ProcessManagerService.sendEvent(ProcessManagerService.groovy:359)
at ProcessManagerService$sendEvent$0.callCurrent(Unknown Source)
at ProcessManagerService.sendEvent(ProcessManagerService.groovy:279)
at ProcessManagerService$$FastClassByCGLIB$$b8eb8e77.invoke(<generated>)
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:688)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:621)
at ProcessManagerService$$EnhancerByCGLIB$$8e9fc43f.sendEvent(<generated>)
Has anyone been able to setup the demo fine?
Related
My Code was working with org.owasp.esapi 2.2.0.0 but after upgrading to 2.2.3.1 I am getting ClassNotFoundException.
My Code is something like:
Properties esapiProps = new Properties();
try {
esapiProps.load( SecurityUtil.class.getResourceAsStream("/ESAPI.properties") );
} catch (IOException | NullPointerException e) {
logger.log(Level.SEVERE, "esapi Exception: ", e);
}
ESAPI.override( new DefaultSecurityConfiguration(esapiProps));
// ----- Then canonicalize an input -----
ESAPI.encoder().canonicalize(input);
I read the release notes and added some properties and esapi-java-logging
my ESAPI.properties (in class path)
ESAPI.printProperties=true
LogLevel=INFO
ESAPI.Encoder=org.owasp.esapi.reference.DefaultEncoder
Encoder.AllowMultipleEncoding=false
Encoder.AllowMixedEncoding=false
Encoder.DefaultCodecList=HTMLEntityCodec,PercentCodec,JavaScriptCodec
ESAPI.Logger=org.owasp.esapi.reference.JavaLogFactory
Logger.ApplicationName=My Test Application
Logger.LogEncodingRequired=false
Logger.LogApplicationName=true
Logger.LogServerIP=true
Logger.LogFileName=ESAPI_logging_file
Logger.MaxLogFileSize=10000000
Logger.UserInfo=true
Logger.ClientInfo=true
my esapi-java-logging.properties (in class path)
handlers= java.util.logging.ConsoleHandler
.level= INFO
java.util.logging.ConsoleHandler.level = INFO
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
java.util.logging.SimpleFormatter.format=[%1$tF %1$tT] [%3$-7s] %5$s %n
but I get this exception:
[ERROR ] SRVE0315E: An exception occurred: java.lang.Throwable: org.owasp.esapi.errors.ConfigurationException: java.lang.reflect.InvocationTargetException Encoder class (org.owasp.esapi.reference.DefaultEncoder) CTOR threw exception.
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:5095)
at [internal classes]
Caused by: org.owasp.esapi.errors.ConfigurationException: java.lang.reflect.InvocationTargetException Encoder class (org.owasp.esapi.reference.DefaultEncoder) CTOR threw exception.
at org.owasp.esapi.util.ObjFactory.make(ObjFactory.java:129)
at org.owasp.esapi.ESAPI.encoder(ESAPI.java:101)
.
.
.
at sun.reflect.GeneratedMethodAccessor521.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.wink.server.internal.handlers.InvokeMethodHandler.handleRequest(InvokeMethodHandler.java:63)
... 1 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor522.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.owasp.esapi.util.ObjFactory.make(ObjFactory.java:86)
... 8 more
Caused by: org.owasp.esapi.errors.ConfigurationException: java.lang.ClassNotFoundException: org.owasp.esapi.reference.JavaLogFactory LogFactory class (org.owasp.esapi.reference.JavaLogFactory) must be in class path.
... 17 more
Caused by: java.lang.ClassNotFoundException: org.owasp.esapi.reference.JavaLogFactory
at com.ibm.ws.classloading.internal.AppClassLoader.findClassCommonLibraryClassLoaders(AppClassLoader.java:569)
at [internal classes]
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at org.owasp.esapi.util.ObjFactory.loadClassByStringName(ObjFactory.java:158)
at org.owasp.esapi.util.ObjFactory.make(ObjFactory.java:81)
... 15 more
If I change my ESAPI.properties and copy what is in https://raw.githubusercontent.com/ESAPI/esapi-java-legacy/develop/configuration/esapi/ESAPI.properties, ClassNotFoundException goes away and I get NullPointerException exception:
[ERROR ] SRVE0315E: An exception occurred: java.lang.Throwable: org.owasp.esapi.errors.ConfigurationException: java.lang.reflect.InvocationTargetException Encoder class (org.owasp.esapi.reference.DefaultEncoder) CTOR threw exception.
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:5095)
at [internal classes]
Caused by: org.owasp.esapi.errors.ConfigurationException: java.lang.reflect.InvocationTargetException Encoder class (org.owasp.esapi.reference.DefaultEncoder) CTOR threw exception.
at org.owasp.esapi.util.ObjFactory.make(ObjFactory.java:129)
at org.owasp.esapi.ESAPI.encoder(ESAPI.java:101)
.
.
.
at sun.reflect.GeneratedMethodAccessor522.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.wink.server.internal.handlers.InvokeMethodHandler.handleRequest(InvokeMethodHandler.java:63)
... 1 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor523.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.owasp.esapi.util.ObjFactory.make(ObjFactory.java:86)
... 8 more
Caused by: java.lang.ExceptionInInitializerError
... 20 more
Caused by: java.lang.NullPointerException
... 22 more
You said that you read the release notes. The reason for your problem is a detail that you missed that was documented there. Look in those release notes, in the section labeled:
*** IMPORTANT WORKAROUND for 2.2.1.0 ESAPI Logging ***
There, it states:
Lastly, if you try to use the new ESAPI 2.2.1.0 logging, you will notice that you need to change ESAPI.Logger and also possibly provide some other logging properties as well. This is because the logger packages were reorganized to improve maintainability, but we failed to mention it. To use ESAPI logging in ESAPI 2.2.1.0 (and later), you MUST set the ESAPI.Logger property to one of:
org.owasp.esapi.logging.java.JavaLogFactory - To use the new default, java.util.logging (JUL)
org.owasp.esapi.logging.log4j.Log4JLogFactory - To use the end-of-life Log4J 1.x logger
org.owasp.esapi.logging.slf4j.Slf4JLogFactory - To use the new (to release 2.2.0.0) SLF4J logger
Between that and a careful reading of your exception stack trace:
... deleted...
Caused by: org.owasp.esapi.errors.ConfigurationException: java.lang.ClassNotFoundException: org.owasp.esapi.reference.JavaLogFactory LogFactory class (org.owasp.esapi.reference.JavaLogFactory) must be in class path.
... 17 more
Caused by: java.lang.ClassNotFoundException: org.owasp.esapi.reference.JavaLogFactory
...deleted...
I think that should explain the reason. Those classes were reorganized to different packages to accommodate SLF4J logging.
There is some typo with logger factory config in ESAPI.properties. The classes are in org.owasp.esapi.logging.*.
#ESAPI.Logger=org.owasp.esapi.logging.log4j.Log4JLogFactory
#ESAPI.Logger=org.owasp.esapi.logging.slf4j.Slf4JLogFactory
ESAPI.Logger=org.owasp.esapi.logging.java.JavaLogFactory
all i did is setup the project and the mod id and that stuff and first time running i get this erorr
Exception in thread "main" org.spongepowered.asm.launch.MixinInitialisationError: Error initialising mixin config modid.mixins.json
at org.spongepowered.asm.mixin.transformer.Config.create(Config.java:153)
at org.spongepowered.asm.mixin.Mixins.createConfiguration(Mixins.java:100)
at org.spongepowered.asm.mixin.Mixins.addConfiguration(Mixins.java:87)
at net.fabricmc.loader.launch.common.FabricMixinBootstrap.addConfiguration(FabricMixinBootstrap.java:44)
at java.base/java.lang.Iterable.forEach(Iterable.java:75)
at net.fabricmc.loader.launch.common.FabricMixinBootstrap.init(FabricMixinBootstrap.java:83)
at net.fabricmc.loader.launch.knot.Knot.init(Knot.java:132)
at net.fabricmc.loader.launch.knot.KnotClient.main(KnotClient.java:28)
at net.fabricmc.devlaunchinjector.Main.main(Main.java:86)
Caused by: java.lang.IllegalArgumentException: The specified resource 'modid.mixins.json' was invalid or could not be read
at org.spongepowered.asm.mixin.transformer.MixinConfig.create(MixinConfig.java:1090)
at org.spongepowered.asm.mixin.transformer.Config.create(Config.java:148)
... 8 more
Make sure to change modid.mixins.json in your fabric.mod.json
I am using for the first time Play framework, on Ubuntu 14, with an existing project. When I try to run the application, I get the following error:
Internal Server Error (500) for request GET /
Oops: UnexpectedException
Unexpected error : While applying play.CorePlugin#44821a96 on models.BookingDTO, caused by exception UnexpectedException: While applying class play.classloading.enhancers.LVEnhancer on models.BookingDTO
play.exceptions.UnexpectedException: While applying play.CorePlugin#44821a96 on models.BookingDTO
at play.plugins.PluginCollection.enhance(PluginCollection.java:582)
at play.classloading.ApplicationClasses$ApplicationClass.enhance(ApplicationClasses.java:242)
at play.classloading.ApplicationClassloader.loadApplicationClass(ApplicationClassloader.java:164)
at play.classloading.ApplicationClassloader.getAllClasses(ApplicationClassloader.java:431)
at play.Play.start(Play.java:527)
at play.Play.detectChanges(Play.java:647)
at play.Invoker$Invocation.init(Invoker.java:205)
at Invocation.HTTP Request(Play!)
Caused by: play.exceptions.UnexpectedException: While applying class play.classloading.enhancers.LVEnhancer on models.BookingDTO
at play.CorePlugin.enhance(CorePlugin.java:314)
at play.plugins.PluginCollection.enhance(PluginCollection.java:577)
... 7 more
Caused by: play.exceptions.UnexpectedException: LVEnhancer: cannot enhance the behavior 'models.BookingDTO.findAllNextBookings(java.lang.String)'
at play.classloading.enhancers.LVEnhancer.enhanceThisClass(LVEnhancer.java:112)
at play.CorePlugin.enhance(CorePlugin.java:309)
... 8 more
Caused by: java.lang.NullPointerException
at bytecodeparser.CodeParser.parse(CodeParser.java:53)
at bytecodeparser.analysis.stack.StackAnalyzer.init(StackAnalyzer.java:91)
What's wrong?
Thank you very much for your answer.
I found the solution : I didn't have the version of javassist that didin't match with the project files.
With the Playframework 1.3, javassist-3.20xxx didn't work. I had to install javassist-3.19xxx
When specific bundle, which uses Hibernate is updated, persisting exception occurs:
java.lang.reflect.UndeclaredThrowableException
at com.sun.proxy.$Proxy71.persist(Unknown Source)
at com.aurimas.edi.persistence.service.impl.Hl7StagingAreaServiceImpl.persistHl7Message(Hl7StagingAreaServiceImpl.java:37)[249:com.aurimas.edi.osgi-adapter-bi-sa-db:1.0.0.SNAPSHOT]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.8.0_60]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[:1.8.0_60]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.8.0_60]
at java.lang.reflect.Method.invoke(Method.java:497)[:1.8.0_60]
at org.apache.aries.proxy.impl.ProxyHandler$1.invoke(ProxyHandler.java:54)
at org.apache.aries.proxy.impl.ProxyHandler.invoke(ProxyHandler.java:119)
at com.aurimas.edi.persistence.service.impl.$Hl7StagingAreaServiceImpl1100807931.persistHl7Message(Unknown Source)[249:com.aurimas.edi.osgi-adapter-bi-sa-db:1.0.0.SNAPSHOT]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.8.0_60]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[:1.8.0_60]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.8.0_60]
at java.lang.reflect.Method.invoke(Method.java:497)[:1.8.0_60]
at org.apache.camel.component.bean.MethodInfo.invoke(MethodInfo.java:408)[76:org.apache.camel.camel-core:2.14.0]
at org.apache.camel.component.bean.MethodInfo$1.doProceed(MethodInfo.java:279)[76:org.apache.camel.camel-core:2.14.0]
at org.apache.camel.component.bean.MethodInfo$1.proceed(MethodInfo.java:252)[76:org.apache.camel.camel-core:2.14.0]
at org.apache.camel.component.bean.BeanProcessor.process(BeanProcessor.java:167)[76:org.apache.camel.camel-core:2.14.0]
at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)[76:org.apache.camel.camel-core:2.14.0]
at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398)[76:org.apache.camel.camel-core:2.14.0]
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)[76:org.apache.camel.camel-core:2.14.0]
at org.apache.camel.processor.Pipeline.process(Pipeline.java:118)[76:org.apache.camel.camel-core:2.14.0]
at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)[76:org.apache.camel.camel-core:2.14.0]
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)[76:org.apache.camel.camel-core:2.14.0]
at org.apache.camel.component.directvm.DirectVmProcessor.process(DirectVmProcessor.java:55)[76:org.apache.camel.camel-core:2.14.0]
at org.apache.camel.component.directvm.DirectVmProducer.process(DirectVmProducer.java:55)[76:org.apache.camel.camel-core:2.14.0]
at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:120)[76:org.apache.camel.camel-core:2.14.0]
at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)[76:org.apache.camel.camel-core:2.14.0]
at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398)[76:org.apache.camel.camel-core:2.14.0]
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)[76:org.apache.camel.camel-core:2.14.0]
at org.apache.camel.processor.Pipeline.process(Pipeline.java:118)[76:org.apache.camel.camel-core:2.14.0]
at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)[76:org.apache.camel.camel-core:2.14.0]
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)[76:org.apache.camel.camel-core:2.14.0]
at org.apache.camel.component.directvm.DirectVmProcessor.process(DirectVmProcessor.java:55)[76:org.apache.camel.camel-core:2.14.0]
at org.apache.camel.component.directvm.DirectVmProducer.process(DirectVmProducer.java:55)[76:org.apache.camel.camel-core:2.14.0]
at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:120)[76:org.apache.camel.camel-core:2.14.0]
at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)[76:org.apache.camel.camel-core:2.14.0]
at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398)[76:org.apache.camel.camel-core:2.14.0]
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)[76:org.apache.camel.camel-core:2.14.0]
at org.apache.camel.processor.Pipeline.process(Pipeline.java:118)[76:org.apache.camel.camel-core:2.14.0]
at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)[76:org.apache.camel.camel-core:2.14.0]
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)[76:org.apache.camel.camel-core:2.14.0]
at org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:423)[76:org.apache.camel.camel-core:2.14.0]
at org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:211)[76:org.apache.camel.camel-core:2.14.0]
at org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:175)[76:org.apache.camel.camel-core:2.14.0]
at org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:187)[76:org.apache.camel.camel-core:2.14.0]
at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:114)[76:org.apache.camel.camel-core:2.14.0]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_60]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)[:1.8.0_60]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)[:1.8.0_60]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)[:1.8.0_60]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_60]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_60]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_60]
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor67.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.8.0_60]
at java.lang.reflect.Method.invoke(Method.java:497)[:1.8.0_60]
at org.apache.aries.jpa.container.context.transaction.impl.JTAEntityManagerHandler.invoke(JTAEntityManagerHandler.java:185)
... 53 more
Caused by: java.lang.reflect.UndeclaredThrowableException
at com.sun.proxy.$Proxy75.persist(Unknown Source)
... 57 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor67.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.8.0_60]
at java.lang.reflect.Method.invoke(Method.java:497)[:1.8.0_60]
at org.apache.aries.jpa.container.impl.EntityManagerProxyFactory$EMHandler.invoke(EntityManagerProxyFactory.java:31)
... 58 more
Caused by: javax.persistence.PersistenceException: org.hibernate.PropertyAccessException: could not get a field value by reflection getter of com.aurimas.edi.entity.message.HL7Message.id
at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1763)[142:org.hibernate.entitymanager:4.3.6.Final]
at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1677)[142:org.hibernate.entitymanager:4.3.6.Final]
at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1683)[142:org.hibernate.entitymanager:4.3.6.Final]
at org.hibernate.jpa.spi.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:1187)[142:org.hibernate.entitymanager:4.3.6.Final]
... 62 more
Caused by: org.hibernate.PropertyAccessException: could not get a field value by reflection getter of com.aurimas.edi.entity.message.HL7Message.id
at org.hibernate.property.DirectPropertyAccessor$DirectGetter.get(DirectPropertyAccessor.java:60)[141:org.hibernate.core:4.3.6.Final]
at org.hibernate.tuple.entity.AbstractEntityTuplizer.getIdentifier(AbstractEntityTuplizer.java:346)[141:org.hibernate.core:4.3.6.Final]
at org.hibernate.persister.entity.AbstractEntityPersister.getIdentifier(AbstractEntityPersister.java:4746)[141:org.hibernate.core:4.3.6.Final]
at org.hibernate.persister.entity.AbstractEntityPersister.isTransient(AbstractEntityPersister.java:4465)[141:org.hibernate.core:4.3.6.Final]
at org.hibernate.engine.internal.ForeignKeys.isTransient(ForeignKeys.java:243)[141:org.hibernate.core:4.3.6.Final]
at org.hibernate.event.internal.AbstractSaveEventListener.getEntityState(AbstractSaveEventListener.java:511)[141:org.hibernate.core:4.3.6.Final]
at org.hibernate.event.internal.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:116)[141:org.hibernate.core:4.3.6.Final]
at org.hibernate.event.internal.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:75)[141:org.hibernate.core:4.3.6.Final]
at org.hibernate.internal.SessionImpl.firePersist(SessionImpl.java:811)[141:org.hibernate.core:4.3.6.Final]
at org.hibernate.internal.SessionImpl.persist(SessionImpl.java:784)[141:org.hibernate.core:4.3.6.Final]
at org.hibernate.internal.SessionImpl.persist(SessionImpl.java:789)[141:org.hibernate.core:4.3.6.Final]
at org.hibernate.jpa.spi.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:1181)[142:org.hibernate.entitymanager:4.3.6.Final]
... 62 more
Caused by: java.lang.IllegalArgumentException: Can not set java.lang.Long field com.aurimas.edi.entity.message.HL7Message.id to com.aurimas.edi.entity.message.HL7Message
at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:167)[:1.8.0_60]
at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:171)[:1.8.0_60]
at sun.reflect.UnsafeFieldAccessorImpl.ensureObj(UnsafeFieldAccessorImpl.java:58)[:1.8.0_60]
at sun.reflect.UnsafeObjectFieldAccessorImpl.get(UnsafeObjectFieldAccessorImpl.java:36)[:1.8.0_60]
at java.lang.reflect.Field.get(Field.java:393)[:1.8.0_60]
at org.hibernate.property.DirectPropertyAccessor$DirectGetter.get(DirectPropertyAccessor.java:57)[141:org.hibernate.core:4.3.6.Final]
... 73 more
After restarting Karaf this problem disappears and persisting works.
I don't want to restart karaf each time.
I found out that after my bundle update I need to do these steps:
Refresh hibernate-osgi bundle
Restart my bundle
And then everything starts working, but I don't want to refresh hibernate-osgi and restart my bundle each time as well.
I'm using Apache Karaf 3.0.3, Hibernate 4.3.6, Java 1.8.0_60.
Note that this is absolutely expected in Hibernate ORM OSGi 4.x and 5.0.x. Restarting your application bundle has disastrous consequences for hibernate-osgi and ultimately hibernate-core. Until https://hibernate.atlassian.net/browse/HHH-9818 is corrected (we will work on it soon), Hibernate ORM OSGi should be considered static, rather than dynamically reacting to OSGi bundle events.
Well you need to do a refresh on the hibernate-bundle as it's not aware of a change to your updated bundle, it still holds a reference to the old bundle. Therefore an update always also needs a refresh for the other bundles.
This is by design as an Update just updates the Bundle itself but doesn't trigger an "update" of the resolving of all other dependencies. Therefore it is mandatory for you to trigger that "update" on the resolving of bundles yourself with the refresh command. This can either be done with the ID of the hibernate-bundle or "refresh" only. The second will update the resolving of all bundles you have installed.
I am using git bash in windows. I downloaded and unzip the play framework and set the path also, but as soon as I run activator new it gives following error
$ activator new
java.lang.ExceptionInInitializerError
at activator.ActivatorCli$$anonfun$apply$1.apply$mcI$sp(ActivatorCli.sca
la:21)
at activator.ActivatorCli$$anonfun$apply$1.apply(ActivatorCli.scala:19)
at activator.ActivatorCli$$anonfun$apply$1.apply(ActivatorCli.scala:19)
at activator.ActivatorCli$.withContextClassloader(ActivatorCli.scala:179
)
at activator.ActivatorCli$.apply(ActivatorCli.scala:19)
at activator.ActivatorLauncher.run(ActivatorLauncher.scala:28)
at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:109)
at xsbt.boot.Launch$.withContextLoader(Launch.scala:129)
at xsbt.boot.Launch$.run(Launch.scala:109)
at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:36)
at xsbt.boot.Launch$.launch(Launch.scala:117)
at xsbt.boot.Launch$.apply(Launch.scala:19)
at xsbt.boot.Boot$.runImpl(Boot.scala:44)
at xsbt.boot.Boot$.main(Boot.scala:20)
at xsbt.boot.Boot.main(Boot.scala)
Caused by: java.lang.RuntimeException: BAD URI: file://f:/Play/activator-1.2.10-
minimal
at activator.properties.ActivatorProperties.uriToFilename(ActivatorPrope
rties.java:106)
at activator.properties.ActivatorProperties.ACTIVATOR_HOME_FILENAME(Acti
vatorProperties.java:113)
at activator.properties.ActivatorProperties.ACTIVATOR_TEMPLATE_LOCAL_REP
O(ActivatorProperties.java:179)
at activator.UICacheHelper$.<init>(UICacheHelper.scala:31)
at activator.UICacheHelper$.<clinit>(UICacheHelper.scala)
... 15 more
Caused by: java.lang.IllegalArgumentException: URI has an authority component
at java.io.File.<init>(File.java:397)
at activator.properties.ActivatorProperties.uriToFilename(ActivatorPrope
rties.java:101)
... 19 more
Error during sbt execution: java.lang.ExceptionInInitializerError
can any one help how shall i proceed.
It is pretty much clear if you read your (own) stack trace carefully:
Caused by: java.lang.RuntimeException: BAD URI: file://f:/Play/activator-1.2.10-minimal
You are trying to access a file via an URI which is malformed.
A correct URI would be either file:/f:/Play/activator-1.2.10-minimal or file:///f:/Play/activator-1.2.10-minimal (see also this answer).
Amit... probably he dont know (how to) "play" ....
check this up...
https://github.com/typesafehub/activator/issues/648