Грешка на Flex Weblogic Blazes

Имам приложение Flex/Parsley/Blazes, внедрено на weblogic 9.x. Следната грешка се появява в регистрационните файлове на weblogic първия път, когато се опитвам да се свържа с Java клас от страна на сървъра, използвайки отдалечено управление. След първия път, когато приложението работи добре... Странно, всякакви идеи ще бъдат оценени, благодаря.

   FaultEvent fault=[RPC Fault faultString="Send failed" faultCode="Client.Error.MessageSend" faultDetail="Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Status 500: url: 'http://localhost:8001/ReviewItemsServer/messagebroker/amf'"] messageId="EA02DD33-22C2-A669-EB0C-EE377DBBC233" type="fault" bubbles=false cancelable=true eventPhase=2]

Регистрационните файлове на weblogic показват следната грешка:

<27-Oct-2010 13:22:45 o'clock BST> <Error> <HTTP> <BEA-101017> <[weblogic.servlet.internal.WebAppServletContext@227c0a6 - appName: 'ReviewItemsServer', name: 'ReviewItemsServer.war', context-path: '/ReviewItemsServer'] Root cause of ServletException.
java.lang.NoSuchMethodError: setExclusiveOwnerThread
at edu.emory.mathcs.backport.java.util.concurrent.locks.ReentrantLock$NonfairSync.lock(ReentrantLock.java:186)
at flex.messaging.HttpFlexSession.setHttpSession(HttpFlexSession.java:550)

Включих WEB.XML за справка:

    <?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
        xmlns="http://java.sun.com/xml/ns/j2ee" 
        xmlns:web="http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" 
        xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
                            http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">
  <listener>
    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
  </listener>

  <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value> 
    /WEB-INF/spring/applicationContext.xml,
    /WEB-INF/spring/infrastructureContext.xml
    </param-value>
  </context-param>

  <listener>
    <listener-class>flex.messaging.HttpFlexSession</listener-class>
  </listener>

  <servlet>
    <servlet-name>flexspring</servlet-name>
    <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
    <init-param>
      <param-name>contextConfigLocation</param-name>
      <param-value></param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
  </servlet>

  <servlet-mapping>
    <servlet-name>flexspring</servlet-name>
    <url-pattern>/messagebroker/*</url-pattern>
  </servlet-mapping>
</web-app>

Стартирането на weblogic конзолата е показано по-долу:

[Flex]Using MBeanServerLocator: flex.management.PlatformMBeanServerLocator
[Flex]No login command was found for 'WebLogic Server 9.2 Fri Jun 23 20:47:26 EDT 2006 783464 '. Please ensure that the login-command tag has the correct server attribute value, or use 'all' to use the login command regardless of the server.
[Flex]Endpoint 'my-streaming-amf' created with security: None
at URL: http://{server.name}:{server.port}/{context.root}/messagebroker/streamingamf
[Flex]Endpoint 'my-amf' created with security: None
at URL: http://{server.name}:{server.port}/{context.root}/messagebroker/amf
[Flex]Endpoint 'my-polling-amf' created with security: None
at URL: http://{server.name}:{server.port}/{context.root}/messagebroker/amfpolling
[Flex]MessageBroker id: _messageBroker classLoader is: the MessageBroker's class loader and the context class loader (classLoader hashCode: 61418221 (parent hashCode: 61416508 (parent hashCode: 61416374 (parent hashCode: 44613654 (parent hashCode: 36679827 (parent system)))))
[Flex]Service with id 'authentication-service' is starting.
[Flex]Service with id 'authentication-service' is ready (startup time: '0' ms)
[Flex]Service with id 'message-service' is starting.
[Flex]Service with id 'message-service' is ready (startup time: '0' ms)
[Flex]Service with id 'remoting-service' is starting.
[Flex]Service with id 'remoting-service' is ready (startup time: '0' ms)

Flex Debug - включено - С ПЪРВОНАЧАЛНА ГРЕШКА ЗА ДИСТАНЦИОННО

    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)
BEA JRockit(R) (build R26.0.0-189_CR269406-59389-1.5.0_04-20060322-1120-win-ia32, )
Starting WLS with line:
C:\bea\JROCKI~2\bin\java  -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=1044,server=y,suspend=n  -jrockit   -Xms256m -Xmx512m  -Xverify:none  -da -Dplatform.home=C:\bea\weblogic\9.2 -Dwls.home=C:\bea\weblogic\9.2\server -Dwli.home=C:\bea\weblogic\9.2\integration  -Dweblogic.management.disc
over=true  -Dwlw.iterativeDev= -Dwlw.testConsole= -Dwlw.logErrorsToConsole= -Dweblogic.ext.dirs=C:\bea\patch_weblogic920\profiles\default\sysext_manifest_classpath -Dweblogic.Name=AdminServer -Djava.security.policy=C:\bea\weblogic\9.2\server\lib\weblogic.policy   weblogic.Server
<14-Dec-2010 14:53:26 o'clock GMT> <Notice> <WebLogicServer> <BEA-000395> <Following extensions directory contents added to the end of the classpath:
C:\bea\weblogic\9.2\platform\lib\p13n\p13n-schemas.jar;C:\bea\weblogic\9.2\platform\lib\p13n\p13n_common.jar;C:\bea\weblogic\9.2\platform\lib\p13n\p13n_system.jar;C:\bea\weblogic\9.2\platform\lib\wlp\netuix_common.jar;C:\bea\weblogic\9.2\platform\lib\wlp\netuix_schemas.jar;C:\bea\weblogic\9.2\platfo
rm\lib\wlp\netuix_system.jar;C:\bea\weblogic\9.2\platform\lib\wlp\wsrp-common.jar>
<14-Dec-2010 14:53:26 o'clock GMT> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with BEA JRockit(R) Version R26.0.0-189_CR269406-59389-1.5.0_04-20060322-1120-win-ia32 from BEA Systems, Inc.>
<14-Dec-2010 14:53:27 o'clock GMT> <Info> <Management> <BEA-141107> <Version: WebLogic Server 9.2  Fri Jun 23 20:47:26 EDT 2006 783464 >
<14-Dec-2010 14:53:28 o'clock GMT> <Info> <WebLogicServer> <BEA-000215> <Loaded License : C:\bea\license.bea>
<14-Dec-2010 14:53:28 o'clock GMT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
<14-Dec-2010 14:53:28 o'clock GMT> <Info> <WorkManager> <BEA-002900> <Initializing self-tuning thread pool>
<14-Dec-2010 14:53:28 o'clock GMT> <Notice> <Log Management> <BEA-170019> <The server log file C:\bea\user_projects_91\domains\base_domain\servers\AdminServer\logs\AdminServer.log is opened. All server side log events will be written to this file.>
<14-Dec-2010 14:53:29 o'clock GMT> <Notice> <Security> <BEA-090082> <Security initializing using security realm myrealm.>
<14-Dec-2010 14:53:31 o'clock GMT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STANDBY>
<14-Dec-2010 14:53:31 o'clock GMT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
<14-Dec-2010 14:53:32 o'clock GMT> <Warning> <JMS> <BEA-040456> <An entity of type "ForeignServers" with name "SMO JMS Server" in JMS module "SMO_MODULE" is not targeted. There is no sub-deployment with name "SMO-Subdeployment" in the configuration repository (config.xml), and so this entity will no
t exist anywhere in the domain.>
[Flex]The class loader could not locate the string resource property file 'flex/messaging/errors_en_GB.properties'. This may not be an issue if a property file is available for a less specific locale or the default locale.
[Flex]The class loader could not locate the string resource property file 'flex/data/errors_en_GB.properties'. This may not be an issue if a property file is available for a less specific locale or the default locale.
[Flex]The class loader could not locate the string resource property file 'flex/messaging/errors_en.properties'. This may not be an issue if a property file is available for a less specific locale or the default locale.
[Flex]Not using MBeanServerLocator: flex.management.WebSphereMBeanServerLocator. Reason: Cannot create class of type 'com.ibm.websphere.management.AdminServiceFactory'.
[Flex]Using MBeanServerLocator: flex.management.PlatformMBeanServerLocator
[Flex]No login command was found for 'WebLogic Server 9.2 Fri Jun 23 20:47:26 EDT 2006 783464 '. Please ensure that the login-command tag has the correct server attribute value, or use 'all' to use the login command regardless of the server.
[Flex]Endpoint 'my-streaming-amf' created with security: None
at URL: http://{server.name}:{server.port}/{context.root}/messagebroker/streamingamf
[Flex]Endpoint 'my-amf' created with security: None
at URL: http://{server.name}:{server.port}/{context.root}/messagebroker/amf
[Flex]Endpoint 'my-polling-amf' created with security: None
at URL: http://{server.name}:{server.port}/{context.root}/messagebroker/amfpolling
[Flex]MessageBroker id: _messageBroker classLoader is: the MessageBroker's class loader and the context class loader (classLoader hashCode: 62652490 (parent hashCode: 62650777 (parent hashCode: 62650643 (parent hashCode: 44614166 (parent hashCode: 36679827 (parent system)))))
[Flex]Service with id 'authentication-service' is starting.
[Flex]Service with id 'authentication-service' is ready (startup time: '0' ms)
[Flex]Service with id 'message-service' is starting.
[Flex]Service with id 'message-service' is ready (startup time: '16' ms)
[Flex]Service with id 'remoting-service' is starting.
[Flex]Service with id 'remoting-service' is ready (startup time: '0' ms)
<14-Dec-2010 14:53:37 o'clock GMT> <Notice> <Log Management> <BEA-170027> <The server initialized the domain log broadcaster successfully. Log messages will now be broadcasted to the domain log.>
<14-Dec-2010 14:53:37 o'clock GMT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to ADMIN>
<14-Dec-2010 14:53:37 o'clock GMT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RESUMING>
<14-Dec-2010 14:53:37 o'clock GMT> <Notice> <Server> <BEA-002613> <Channel "Default[1]" is now listening on 127.0.0.1:8001 for protocols iiop, t3, ldap, http.>
<14-Dec-2010 14:53:37 o'clock GMT> <Notice> <Server> <BEA-002613> <Channel "Default" is now listening on 147.201.146.91:8001 for protocols iiop, t3, ldap, http.>
<14-Dec-2010 14:53:37 o'clock GMT> <Notice> <WebLogicServer> <BEA-000331> <Started WebLogic Admin Server "AdminServer" for domain "base_domain" running in Development Mode>
<14-Dec-2010 14:53:37 o'clock GMT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RUNNING>
<14-Dec-2010 14:53:37 o'clock GMT> <Notice> <WebLogicServer> <BEA-000360> <Server started in RUNNING mode>
2010-12-14 14:53:38,593INFO org.apache.beehive.netui.util.config.parser.NetUIConfigParser   [Loading the default NetUI config file.  The runtime will be configured with a set of minimum parameters.]
2010-12-14 14:53:38,593INFO org.apache.beehive.netui.util.config.parser.NetUIConfigParser   [NetUIConfigParser -- load config: org/apache/beehive/netui/util/config/internal/beehive-netui-config-default.xml]
2010-12-14 14:53:38,640INFO org.apache.beehive.netui.pageflow.internal.AdapterManager   [No ServletContainerAdapter specified or discovered; using class org.apache.beehive.netui.pageflow.DefaultServletContainerAdapter]
2010-12-14 14:53:38,671INFO org.apache.beehive.netui.pageflow.ProcessPopulate   [Register RequestParameterHandler with
    prefix: checkbox_key
    handler: org.apache.beehive.netui.tags.html.CheckBox$CheckBoxPrefixHandler]
2010-12-14 14:53:38,671INFO org.apache.beehive.netui.pageflow.ProcessPopulate   [Register RequestParameterHandler with
    prefix: checkbox_group_key
    handler: org.apache.beehive.netui.tags.html.CheckBoxGroup$CheckboxGroupPrefixHandler]
2010-12-14 14:53:38,671INFO org.apache.beehive.netui.pageflow.ProcessPopulate   [Register RequestParameterHandler with
    prefix: radio_button_group_key
    handler: org.apache.beehive.netui.tags.html.RadioButtonGroup$RadioButtonGroupPrefixHandler]
2010-12-14 14:53:38,671INFO org.apache.beehive.netui.pageflow.ProcessPopulate   [Register RequestParameterHandler with
    prefix: select_key
    handler: org.apache.beehive.netui.tags.html.Select$SelectPrefixHandler]
2010-12-14 14:53:38,686INFO org.apache.beehive.netui.pageflow.internal.DefaultURLTemplatesFactory   [Running without URL template descriptor, /WEB-INF/beehive-url-template-config.xml]
2010-12-14 14:53:38,718DEBUGorg.apache.struts.util.PropertyMessageResources   [Initializing, config='org.apache.struts.action.ActionResources', returnNull=true]
2010-12-14 14:53:38,733DEBUGorg.apache.struts.action.ActionServlet   [Scanning web.xml for controller servlet mapping]
2010-12-14 14:53:38,749DEBUGorg.apache.struts.action.ActionServlet   [Process servletName=action, urlPattern=*.do]
2010-12-14 14:53:38,749DEBUGorg.apache.struts.action.ActionServlet   [Process servletName=XmlHttpRequestServlet, urlPattern=*.xhr]
2010-12-14 14:53:38,749DEBUGorg.apache.struts.action.ActionServlet   [Process servletName=XmlHttpRequestServlet, urlPattern=*.render]
2010-12-14 14:53:38,749DEBUGorg.apache.struts.action.ActionServlet   [Mapping for servlet 'action' = '*.do']
2010-12-14 14:53:38,765DEBUGorg.apache.beehive.netui.pageflow.AutoRegisterActionServlet   [Initializing module path '' configuration from '/WEB-INF/classes/_pageflow/struts-config.xml']
2010-12-14 14:53:38,890DEBUGorg.apache.struts.action.ActionServlet   [Initializing module path '' message resources from 'org.apache.beehive.netui.pageflow.validation.defaultMessages']
2010-12-14 14:53:38,890DEBUGorg.apache.struts.util.PropertyMessageResources   [Initializing, config='org.apache.beehive.netui.pageflow.validation.defaultMessages', returnNull=true]
2010-12-14 14:53:38,890DEBUGorg.apache.struts.action.ActionServlet   [Initializing module path '' data sources]
2010-12-14 14:53:38,890DEBUGorg.apache.struts.action.ActionServlet   [Initializing module path '' plug ins]
<14-Dec-2010 14:53:56 o'clock GMT> <Error> <HTTP> <BEA-101017> <[weblogic.servlet.internal.WebAppServletContext@3a979c2 - appName: 'ReviewItemsServer', name: 'ReviewItemsServer.war', context-path: '/ReviewItemsServer'] Root cause of ServletException.
java.lang.NoSuchMethodError: setExclusiveOwnerThread
    at edu.emory.mathcs.backport.java.util.concurrent.locks.ReentrantLock$NonfairSync.lock(ReentrantLock.java:186)
    at edu.emory.mathcs.backport.java.util.concurrent.locks.ReentrantLock.lock(ReentrantLock.java:266)
    at edu.emory.mathcs.backport.java.util.concurrent.ConcurrentHashMap$Segment.put(ConcurrentHashMap.java:418)
    at edu.emory.mathcs.backport.java.util.concurrent.ConcurrentHashMap.put(ConcurrentHashMap.java:884)
    at flex.messaging.HttpFlexSession.setHttpSessio (HttpFlexSession.java:550)
    Truncated. see log file for complete stacktrace
>

Flex Debug - включено - С УСПЕШНО ОТДАЛЕЧНО ПОВИКВАНЕ

    [Flex]Deserializing AMF/HTTP request
Version: 3
  (Message #0 targetURI=null, responseURI=/1)
    (Array #0)
      [0] = (Typed Object #0 'flex.messaging.messages.CommandMessage')
    operation = 5
    correlationId = ""
    headers = (Object #1)
      DSId = "nil"
      DSMessagingVersion = 1
    timestamp = 0
    body = (Object #2)
    clientId = null
    destination = ""
    messageId = "47D7323A-E6FC-AEC4-5584-E55FAF2E778F"
    timeToLive = 0

[Flex]FlexClient created with id '9BFE9C7A-4A0A-0B0A-1764-5544D742138B'.
[Flex]Executed command: (default service)
  commandMessage: Flex Message (flex.messaging.messages.CommandMessage)
    operation = client_ping
    clientId = 9BFE9C7A-4A1B-4999-ED3D-4866B9919E89
    correlationId =
    destination =
    messageId = 47D7323A-E6FC-AEC4-5584-E55FAF2E778F
    timestamp = 1292338442249
    timeToLive = 0
    body = {}
    hdr(DSEndpoint) = my-amf
    hdr(DSId) = nil
    hdr(DSMessagingVersion) = 1
  replyMessage: Flex Message (flex.messaging.messages.AcknowledgeMessage)
    clientId = 9BFE9C7A-4A1B-4999-ED3D-4866B9919E89
    correlationId = 47D7323A-E6FC-AEC4-5584-E55FAF2E778F
    destination = null
    messageId = 9BFE9CED-090E-DFC5-54A6-1F968D5CB445
    timestamp = 1292338442265
    timeToLive = 0
    body = null
    hdr(DSId) = 9BFE9C7A-4A0A-0B0A-1764-5544D742138B
    hdr(DSMessagingVersion) = 1.0

[Flex]Serializing AMF/HTTP response
Version: 3
  (Message #0 targetURI=/1/onResult, responseURI=)
    (Externalizable Object #0 'DSK')
      (Object #1)
    DSId = "9BFE9C7A-4A0A-0B0A-1764-5544D742138B"
    DSMessagingVersion = 1.0
1.292338442265E12
(Byte Array #2, Length 16)
(Byte Array #3, Length 16)
(Byte Array #4, Length 16)

[Flex]Deserializing AMF/HTTP request
Version: 3
  (Message #0 targetURI=null, responseURI=/2)
    (Array #0)
      [0] = (Typed Object #0 'flex.messaging.messages.RemotingMessage')
    operation = "setReviewItemsParams"
    source = null
    headers = (Object #1)
      DSRemoteCredentials = ""
      DSEndpoint = null
      DSRemoteCredentialsCharset = null
      DSId = "9BFE9C7A-4A0A-0B0A-1764-5544D742138B"
    timestamp = 0
    body = (Array #2)
      [0] = 11162
      [1] = 2
    clientId = null
    destination = "remoteReviewItemsService"
    messageId = "9E33D197-6D2A-7507-DBCA-E55FAEFFC8AB"
    timeToLive = 0

[Flex]Before invoke service: remoting-service
  incomingMessage: Flex Message (flex.messaging.messages.RemotingMessage)
    operation = setReviewItemsParams
    clientId = 9BFEA163-9D0F-10F2-D003-4609CD6AE1AA
    destination = remoteReviewItemsService
    messageId = 9E33D197-6D2A-7507-DBCA-E55FAEFFC8AB
    timestamp = 1292338442733
    timeToLive = 0
    body =
    [
      11162,
      2
    ]
    hdr(DSEndpoint) = my-amf
    hdr(DSId) = 9BFE9C7A-4A0A-0B0A-1764-5544D742138B
    hdr(DSRemoteCredentials) =

[Flex]Adapter 'java-object' called 'null.setReviewItemsParams(java.util.Arrays$ArrayList (Collection size:2)
  [0] = 11162
  [1] = 2
)'
[Flex]Result: 'null'
[Flex]After invoke service: remoting-service
  reply: null

[Flex]Serializing AMF/HTTP response
Version: 3
  (Message #0 targetURI=/2/onResult, responseURI=)
    (Externalizable Object #0 'DSK')
      1.292338442874E12
(Byte Array #1, Length 16)
(Byte Array #2, Length 16)
(Byte Array #3, Length 16)

person Michael    schedule 27.10.2010    source източник


Отговори (2)


Изглежда, че извиквате метод, който или не съществува, или го извиквате с несъвпадащи параметри.

person James Ward    schedule 29.10.2010
comment
Здравей Джеймс, грешката изглежда е в HttpFlexSession. Както беше посочено, първият път, когато се направи отдалечено повикване (към Java клас), получавам тази грешка. Всички следващи извиквания към същия отдалечен метод работят добре. Проблемите изглежда са свързани с първия път, когато се създава HttpFlexSession. - person Michael; 13.12.2010
comment
Сървлетът зарежда ли се при стартиране? Имате ли слушателя HttpFlexSession в web.xml? - person James Ward; 13.12.2010
comment
Джеймс, не мисля, че сървлетът Flex/Spring се зарежда при стартиране... Включих моя конзолен изход Web.XML и Weblogic (по-горе като справка)... Ако сървлетът се зарежда, не трябва ли да видим нещо като Инициализиране на Spring FrameworkServlet 'flexspring'? - person Michael; 14.12.2010
comment
Всичко това изглежда правилно. Сървлетът се зарежда при стартиране и имате правилния слушател. Какви версии на Spring BlazeDS и BlazeDS използвате? - person James Ward; 14.12.2010
comment
Използвам всички зависимости от вашата интеграция на Flex 4 & Spring 3 - всъщност Dzone RefCarz, така че версиите са: Spring BlazeDS Integration 1.0.3, Spring Framework 3.0.2, BlazeDS 4 - person Michael; 14.12.2010
comment
Хммм... Добре. Никога не съм го опитвал на Weblogic, но просто трябва да работи. Можете ли да увеличите детайлността на регистрирането за отстраняване на грешки във файла services-config.xml? - person James Ward; 14.12.2010
comment
Използвал съм JBOSS с това приложение и работи добре - така че може да е свързано с Weblogic. Включих изхода от DEBUG по-горе - в секциите Flex Debug - включено - С ПЪРВОНАЧАЛНА ГРЕШКА ПРИ ДИСТАНЦИОННО РЕГУЛИРАНЕ и Flex Debug - включено - С УСПЕШНО ДИСТАНЦИОННО ПОВИКВАНЕ - person Michael; 14.12.2010
comment
Здравей Джеймс, всякакви последващи действия... грешката все още е там при стартиране. Мисля, че може да е грешка с пакета Spring/BlazeDS, внедрен в Weblogic. За да изолирам грешката, мисля да премахна Spring/BlazeDS и просто да използвам BlazeDS. Какво мислите по този въпрос? Източникът на грешката е в - flex.messaging.HttpFlexSession.setHttpSession - което трябва да е стандартно в BlazeDS и Spring/BlazeDS, нали? Така че мисля, че може да е проблем с конфигурацията от моя страна... - person Michael; 06.01.2011

Можете да проверите backport-util-concurrent.jar, което трябва да съответства на вашия JDK.

person mark    schedule 27.02.2011