环境:
服务器:本地机器,Windows10,64位
JDK1.8
背景:
接手公司原来框架项目,发布打包发布到本地后出现下放报错,百度搜索报错信息,并未找到解决方案。写下此内容,希望能够帮助其他不幸遇到此问题的小伙伴解决此报错。
主要报错信息:
Caused by: java.lang.IllegalStateException: Can not get system java compiler. Please run with JDK (NOT JVM), or configure the httl.properties: compiler=httl.spi.compilers.JavassistCompiler, and add javassist.jar.
完整报错信息:
ameba.container.ContainerException: java.lang.reflect.InvocationTargetException
at ameba.container.Container.create(Container.java:65)
at ameba.Ameba.bootstrap(Ameba.java:164)
at ameba.Ameba.bootstrap(Ameba.java:149)
at ameba.Ameba.main(Ameba.java:120)
Caused by: java.lang.reflect.InvocationTargetException: null
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at ameba.container.Container.create(Container.java:63)
... 3 common frames omitted
Caused by: java.lang.IllegalStateException: Failed to init property value. key: engine, value: httl.spi.engines.DefaultEngine, cause: Failed to init properties of bean class httl.spi.engines.DefaultEngine, cause: Failed to init property value. key: map.converter, value: httl.spi.converters.MultiMapConverter, cause: Failed to init properties of bean class httl.spi.converters.MultiMapConverter, cause: Failed to init property value. key: map.converters, value: httl.spi.converters.StringMapConverter, cause: Failed to init properties of bean class httl.spi.converters.StringMapConverter, cause: Failed to init property value. key: codecs, value: httl.spi.codecs.JsonCodec, cause: Failed to init properties of bean class httl.spi.codecs.JsonCodec, cause: Failed to init property value. key: compiler, value: httl.spi.compilers.AdaptiveCompiler, cause: Failed to init properties of bean class httl.spi.compilers.AdaptiveCompiler, cause: Can not get system java compiler. Please run with JDK (NOT JVM), or configure the httl.properties: compiler=httl.spi.compilers.JavassistCompiler, and add javassist.jar.
at httl.util.BeanFactory.getInstance(BeanFactory.java:323)
at httl.util.BeanFactory.createBean(BeanFactory.java:139)
at ameba.mvc.template.httl.HttlMvcFeature.configure(HttlMvcFeature.java:103)
at org.glassfish.jersey.model.internal.CommonConfig.configureFeatures(CommonConfig.java:730)
at org.glassfish.jersey.model.intern