RuntimeEnvironmentPropertiesConfigurer问题 - 在tomcat上运行broadleaf admin时

时间:2014-12-15 12:45:54

标签: 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-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

1 个答案:

答案 0 :(得分:1)

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 /