Java RuntimeEnvironmentPropertiesConfiguration问题-在tomcat上运行broadleaf admin时

Java RuntimeEnvironmentPropertiesConfiguration问题-在tomcat上运行broadleaf admin时,java,maven,tomcat7,broadleaf-commerce,Java,Maven,Tomcat7,Broadleaf Commerce,我使用maven构建了整个应用程序,并尝试在独立的tomcat7上部署admin.war,在服务器启动期间,它显示出一些错误:但服务器仍然启动, 因此,当我进入产品->库存->时,可用数量字段丢失。但是当我运行eclipse时,相同的字段是可用的 Dec 15, 2014 5:45:09 PM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive D:\apache-tom

我使用maven构建了整个应用程序,并尝试在独立的tomcat7上部署admin.war,在服务器启动期间,它显示出一些错误:但服务器仍然启动, 因此,当我进入产品->库存->时,可用数量字段丢失。但是当我运行eclipse时,相同的字段是可用的

Dec 15, 2014 5:45:09 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive D:\apache-tomcat-7.0.42\webapps\admin.war
[ WARN] 17:46:12 RuntimeEnvironmentPropertiesConfigurer - Unable to determine runtime environment, using default environment 'development'
[ WARN] 17:46:20 MergePersistenceUnitManager - A BroadleafClassTransformer is configured for this persistence unit, but Spring reported a problem (likely that a LoadTimeWeaver is not registered). As a result, the Broadleaf Commerce ClassTransformer (org.broadleafcommerce.common.extensibility.jpa.cop
y.DirectCopyClassTransformer) is not being registered with the persistence unit.
[ WARN] 17:46:20 MergePersistenceUnitManager - A BroadleafClassTransformer is configured for this persistence unit, but Spring reported a problem (likely that a LoadTimeWeaver is not registered). As a result, the Broadleaf Commerce ClassTransformer (org.broadleafcommerce.common.extensibility.jpa.con
vert.EntityMarkerClassTransformer) is not being registered with the persistence unit.
[ WARN] 17:46:20 MergePersistenceUnitManager - A BroadleafClassTransformer is configured for this persistence unit, but Spring reported a problem (likely that a LoadTimeWeaver is not registered). As a result, the Broadleaf Commerce ClassTransformer (org.broadleafcommerce.common.extensibility.jpa.cop
y.DirectCopyClassTransformer) is not being registered with the persistence unit.
[ WARN] 17:46:31 AbstractEhcacheRegionFactory - HHH020003: Could not find a specific ehcache configuration for cache named [blSandBoxElements]; using defaults.
[ WARN] 17:47:14 DefaultFilterChainValidator - Possible error: Filters at position 12 and 13 are both instances of org.springframework.security.web.access.intercept.FilterSecurityInterceptor
[ WARN] 17:47:15 RuntimeEnvironmentPropertiesConfigurer - Unable to determine runtime environment, using default environment 'development'
Hibernate: select systemprop0_.BLC_SYSTEM_PROPERTY_ID as BLC1_167_, systemprop0_.FRIENDLY_GROUP as FRIENDLY2_167_, systemprop0_.FRIENDLY_NAME as FRIENDLY3_167_, systemprop0_.FRIENDLY_TAB as FRIENDLY4_167_, systemprop0_.PROPERTY_NAME as PROPERTY5_167_, systemprop0_.PROPERTY_TYPE as PROPERTY6_167_, sy
stemprop0_.PROPERTY_VALUE as PROPERTY7_167_ from BLC_SYSTEM_PROPERTY systemprop0_ where systemprop0_.PROPERTY_NAME=?
Dec 15, 2014 5:47:20 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-apr-8080"]
Dec 15, 2014 5:47:20 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-apr-8009"]
Dec 15, 2014 5:47:20 PM org.apache.catalina.startup.Catalina start

清单是在版本3.1.3中添加的。请确保您使用的是此版本或更新的版本

它是使用
org.broadleafcommerce.common.extensibility.jpa.copy.DirectCopyClassTransformer

这会在运行时添加字段,但这会创建对“Spring Instruments”的依赖,需要将其添加为javaagent

因此,您可以编辑/path/to/tomcat/bin/setenv.sh并添加以下内容

JAVA_OPTS="-Djava.awt.headless=true -Xmx1024M -XX:+UseConcMarkSweepGC  -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=256M -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n -javaagent:/path/to/spring-jar/spring-instrument-3.2.2.RELEASE.jar"
调整Xmx和其他tomcat设置,并用实际路径替换/path/to/spring jar/