0

どこから調べたらよいかわからないという問題があります。

バックグラウンド:

マルチモジュール アプリ - メインの Web アプリ モジュールと各プロバイダーのモジュール。オーバーレイを使用してプロバイダー固有のものをファイル レベルで上書きします。プロバイダー モジュールの 1 つで発生した問題。プロバイダー モジュールは、非常によく似た applicationContext.xml を使用します。問題は、実稼働環境でのみ発生し、同じ git master branch からビルドされたプロバイダー オーバーレイ モジュールの 1 つのみで、1 つの同僚のマシンで発生します。Dev/Test/Prod マシン = Linux、同僚のマシン = iMac、その他全員のマシン = Windows。

問題の Bean が初期化されているときに、WebLogic の起動時に問題が発生します。Bean は、util:set 要素に関して同じ applicationContext.xml で定義されている Set プロパティと関連付けられています。さまざまなモジュールが、同じ Set プロパティを持つ同じ auth_filter Bean を定義します (ただし、プロバイダーはリストに対していくつかの異なる URI を持っている場合があります)。

ビーンの定義:

<bean id="auth_filter" class="xxx.xxx.xxx.xxx.AuthFilter"><!--offending bean-->
    <property name="sessionProfile" ref="sessionProfile"/>
    <property name="allowedURIs" ref="allowedURIs"/><!--offending set-->
    <property name="protectedURIs" ref="protectedURIs"/><!--offending set-->
    <property name="allowedAlwaysURIs" ref="allowedAlwaysURIs"/><!--offending set-->
</bean>

問題のあるセットは次のように定義されています (簡潔にするために 1 つだけ - 他のセットはスイートに従います)。

<util:set id="allowedURIs">
    <value>/</value> <!--this is here because '/j_spring_security_check' presents as this in AuthFilter-->
    <value></value> <!-- for dashboard -->
    <value>/login(/.*)*</value>
    <value>/resources(/.*)*</value>
    <value>/register(/.*)*</value>
    <value>/forgotPassword(/.*)*</value>
    <value>/community(/.*)*</value>
    .
    .
    .
    </util:set>

WebLogic が起動すると、他のモジュールは問題なく起動し、問題のあるモジュールをビルドから除外すると、他のモジュールに問題は見られません。このモジュールでは、次の例外が発生します (簡潔にするために省略されていますが、必要に応じて含めることができます)。

    [2013/07/19 08:46:40] [エラー] org.springframework.web.context.ContextLoader@308 -> コンテキストの初期化に失敗しました
org.springframework.beans.factory.BeanCreationException: ServletContext リソース [/WEB-INF/applicationContext.xml] で定義された 'auth_filter' という名前の Bean の作成中にエラーが発生しました: プロパティ値の設定中にエラーが発生しました。ネストされた例外は org.springframework.beans.PropertyBatchUpdateException; です。ネストされた PropertyAccessExceptions (3) は次のとおりです。
PropertyAccessException 1: org.springframework.beans.MethodInvocationException: プロパティ 'allowedURIs' が例外をスローしました。ネストされた例外は java.lang.NullPointerException です
PropertyAccessException 2: org.springframework.beans.MethodInvocationException: プロパティ 'protectedURIs' が例外をスローしました。ネストされた例外は java.lang.NullPointerException です
PropertyAccessException 3: org.springframework.beans.MethodInvocationException: プロパティ 'allowedAlwaysURIs' が例外をスローしました。ネストされた例外は java.lang.NullPointerException です
    org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues (AbstractAutowireCapableBeanFactory.java:1396) で
    org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1118) で
    org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517) で
    org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) で
    org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294) で
    org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225) で
    org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291) で
    org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) で
    org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585) で
    org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913) で
    org.springframework.context.support.AbstractApplicationContext.refresh (AbstractApplicationContext.java:464) で
    org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:385) で
    org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:284) で
    org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111) で
.
.
.

繰り返しますが、このエラーは、実稼働環境と他の 1 つの同僚のマシンでのみ発生することが示されています。どこから探し始めるかについてのアドバイスは大歓迎です

4

1 に答える 1

0

環境の Weblogic と jre のバージョンを開発テスト セットアップと比較します。春のバージョンが同じかどうかを確認してください。

于 2013-07-19T10:04:24.463 に答える