spring Caused by: java.lang.SecurityException: Prohibited package name: java.time

六月 09, 2014 1:05:02 下午 org.apache.catalina.core.AprLifecycleListener init

信息: Loaded APR based Apache Tomcat Native library 1.1.29 using APR version 1.4.8.

六月 09, 2014 1:05:03 下午 org.apache.catalina.core.AprLifecycleListener init

信息: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].

六月 09, 2014 1:05:04 下午 org.apache.catalina.core.AprLifecycleListener initializeSSL

信息: OpenSSL successfully initialized (OpenSSL 1.0.1e 11 Feb 2013)

六月 09, 2014 1:05:05 下午 org.apache.coyote.AbstractProtocol init

信息: Initializing ProtocolHandler ["http-apr-8080"]

六月 09, 2014 1:05:05 下午 org.apache.coyote.AbstractProtocol init

信息: Initializing ProtocolHandler ["ajp-apr-8009"]

六月 09, 2014 1:05:05 下午 org.apache.catalina.startup.Catalina load

信息: Initialization processed in 5022 ms

六月 09, 2014 1:05:05 下午 org.apache.catalina.core.StandardService startInternal

信息: Starting service Catalina

六月 09, 2014 1:05:05 下午 org.apache.catalina.core.StandardEngine startInternal

信息: Starting Servlet Engine: Apache Tomcat/8.0.5

六月 09, 2014 1:05:05 下午 org.apache.catalina.startup.HostConfig deployDirectory

信息: Deploying web application directory F:\apache-tomcat-8.0.5\webapps\docs

六月 09, 2014 1:05:09 下午 org.apache.jasper.servlet.TldScanner scanJars

信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation
time.

六月 09, 2014 1:05:09 下午 org.apache.catalina.startup.HostConfig deployDirectory

信息: Deploying web application directory F:\apache-tomcat-8.0.5\webapps\examples

六月 09, 2014 1:05:13 下午 org.apache.catalina.core.ApplicationContext log

信息: ContextListener: contextInitialized()

六月 09, 2014 1:05:13 下午 org.apache.catalina.core.ApplicationContext log

信息: SessionListener: contextInitialized()

六月 09, 2014 1:05:13 下午 org.apache.catalina.startup.HostConfig deployDirectory

信息: Deploying web application directory F:\apache-tomcat-8.0.5\webapps\host-manager

六月 09, 2014 1:05:14 下午 org.apache.jasper.servlet.TldScanner scanJars

信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation
time.

六月 09, 2014 1:05:14 下午 org.apache.catalina.startup.HostConfig deployDirectory

信息: Deploying web application directory F:\apache-tomcat-8.0.5\webapps\jpetStore

六月 09, 2014 1:05:37 下午 org.apache.catalina.core.ApplicationContext log

信息: No Spring WebApplicationInitializer types detected on classpath

六月 09, 2014 1:05:37 下午 org.apache.catalina.core.ApplicationContext log

信息: Initializing Spring root WebApplicationContext

log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader).

log4j:WARN Please initialize the log4j system properly.

log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.

六月 09, 2014 1:10:43 下午 org.apache.catalina.core.StandardContext listenerStart

严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener

org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘org.springframework.context.annotation.internalConfigurationAnnotationProcessor‘: Instantiation of bean failed; nested exception is java.lang.ExceptionInInitializerError

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1076)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1021)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:504)

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:200)

at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:88)

at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:609)

at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464)

at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403)

at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)

at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)

at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4739)

at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5159)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:726)

at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:702)

at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:697)

at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1134)

at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1780)

at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)

at java.util.concurrent.FutureTask.run(FutureTask.java:262)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

at java.lang.Thread.run(Thread.java:744)

Caused by: java.lang.ExceptionInInitializerError

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1071)

... 26 more

Caused by: java.lang.SecurityException: Prohibited package name: java.time

at java.lang.ClassLoader.preDefineClass(ClassLoader.java:658)

at java.lang.ClassLoader.defineClass(ClassLoader.java:794)

at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)

at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)

at java.net.URLClassLoader.access$100(URLClassLoader.java:71)

at java.net.URLClassLoader$1.run(URLClassLoader.java:361)

at java.net.URLClassLoader$1.run(URLClassLoader.java:355)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(URLClassLoader.java:354)

at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:894)

at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1298)

at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1175)

at org.springframework.beans.PropertyEditorRegistrySupport.<clinit>(PropertyEditorRegistrySupport.java:92)

... 27 more

六月 09, 2014 1:10:43 下午 org.apache.catalina.core.StandardContext startInternal

严重: Error listenerStart

六月 09, 2014 1:10:43 下午 org.apache.catalina.core.StandardContext startInternal

严重: Context [/jpetStore] startup failed due to previous errors

六月 09, 2014 1:10:43 下午 org.apache.catalina.core.ApplicationContext log

信息: Closing Spring root WebApplicationContext

六月 09, 2014 1:10:43 下午 org.apache.catalina.startup.HostConfig deployDirectory

信息: Deploying web application directory F:\apache-tomcat-8.0.5\webapps\manager

六月 09, 2014 1:10:44 下午 org.apache.jasper.servlet.TldScanner scanJars

信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation
time.

六月 09, 2014 1:10:44 下午 org.apache.catalina.startup.HostConfig deployDirectory

信息: Deploying web application directory F:\apache-tomcat-8.0.5\webapps\ROOT

六月 09, 2014 1:10:45 下午 org.apache.jasper.servlet.TldScanner scanJars

信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation
time.

六月 09, 2014 1:10:45 下午 org.apache.coyote.AbstractProtocol start

信息: Starting ProtocolHandler ["http-apr-8080"]

六月 09, 2014 1:10:45 下午 org.apache.coyote.AbstractProtocol start

信息: Starting ProtocolHandler ["ajp-apr-8009"]

六月 09, 2014 1:10:45 下午 org.apache.catalina.startup.Catalina start

信息: Server startup in 340331 ms

对于这种错误,首先看的是最后一个cause by

java中包的命名不能以java.开头

其次这个原因是因为spring 4.x需要JDK8的支持,而我的版本过低,不支持类"java.time.ZoneId",

源码截取如下

zoneIdClass = ClassUtils.forName("java.time.ZoneId", PropertyEditorRegistrySupport.class.getClassLoader());

spring Caused by: java.lang.SecurityException: Prohibited package name: java.time

时间: 2024-10-15 07:53:18

spring Caused by: java.lang.SecurityException: Prohibited package name: java.time的相关文章

[JAVA] 日常填坑 java.lang.SecurityException: Prohibited package name: java.xxx

java虚拟机不允许包名以java开头. https://blog.csdn.net/sinat_28690417/article/details/72328547 原文地址:https://www.cnblogs.com/huzi007/p/11775752.html

java.lang.SecurityException: Prohibited package name

今天在看<深入理解 Java 虚拟机 (JVM 高级特性与最佳实践)>关于垃圾回收的一些知识.自己建立了一个java工程,敲了一下书上写的代码.运行java程序的时候报错: java.lang.SecurityException: Prohibited package name: java.gc.aty 我的代码如下: package java.gc.aty; public class DeepUnderJvm { private static final int _1MB = 1024 *

java.lang.SecurityException

java.lang.SecurityException: Prohibited package name: java at java.lang.ClassLoader.preDefineClass(ClassLoader.java:479) at java.lang.ClassLoader.defineClassCond(ClassLoader.java:625) at java.lang.ClassLoader.defineClass(ClassLoader.java:615) at java

ContentProvider异常:Caused by: java.lang.SecurityException: Permission Denial

在使用ContentProvider时抛出异常:Caused by: java.lang.SecurityException: Permission Denial 原因:在Provider的 Manifest文件中 对provider的属性描述时 没有 加入 属性 android:exported="true" android:exported属性非常重要.这个属性用于指示该服务是否能够被其他应用程序组件调用或跟它交互.如果设置为true,则能够被调用或交互,否则不能.

Caused by: java.lang.SecurityException: Permission Denial: reading com.android.providers.media.MediaProvider uri content://...

在as中创建cordova中添加从相册选取照片的插件 $cordovaImagePicker 就是以上这货,调用后直接程序就崩溃了,并报错 Caused by: java.lang.SecurityException: Permission Denial: reading com.android.providers.media.MediaProvider uri content://... 添加权限 <uses-permission android:name="android.permis

Android 4.4: java.lang.SecurityException: Package com.android.settings does not belong to 1001

问题描述: 在Android4.4.2上面定制的东西,今天code base改为Android4.4.4. 代码merge到新的Android 4.4.4 code base后,clean build后会报出下面错误: 1 W/dalvikvm( 3125): threadid=1: thread exiting with uncaught exception (group=0x415e8d58) 2 W/AppOps ( 1053): Bad call: specified package c

Caused by: java.lang.SecurityException: Permission Denial: not allowed to send broadcast android.intent.action.HEADSET_PLUG

crash information:Caused by: java.lang.SecurityException: Permission Denial: not allowed to send broadcast android.intent.action.HEADSET_PLUG from    at android.os.Parcel.readException(Parcel.java:1465)     at android.os.Parcel.readException(Parcel.j

webloigc 使用 spring-loaded 报错,java.lang.SecurityException: 无法定位登录配置

spring-loaded是spring的一个开源项目,用于解决热部署的问题,类似于jrebel,但是jrebel是需要付费的,而spring-loaded则不需要,背景就先说到这,现在回归正传.今天按照官方指导文档,在weblogic的启动脚本(starWeblogic.bat)的SAVE_JAVA_OPTIONS中增加如下配置: -javaagent:D:\devtools\spring_loaded\springloaded-1.2.0.RELEASE.jar -noverify 天下无免

Intellij打包jar文件,“java.lang.SecurityException: Invalid signature file digest for Manifest main attrib

开始使用如下代码进行打包 <build> <!-- mvn assembly:assembly -Dmaven.test.skip=true --> <plugins> <plugin> <artifactId>maven-assembly-plugin</artifactId> <version>2.2-beta-5</version> <configuration> <appendAsse