Change Glassfish Servlet Encoding/Charset - servlets

I'm sending a Serializable object to Servlet on Glassfish 4.1 server, the object has String fields with Arabic chars, when I try to log the Arabic values I got (?????)
I've read This and This and many other posts but nothing solved the problem, I've tried the same codes on Tomcat 8 Server and it works fine
What should I do with Glassfish server or my Servlet to read UTF-8 chars correctly?
Sending the Serializable object:
url = new URL(ServerInfo.STORABLE_RECEIVER_URL);
http = (HttpURLConnection) url.openConnection();
http.setRequestProperty("content-type", "application/x-object; charset=utf-8");
http.setRequestProperty("Accept-Charset", "UTF-8");
http.setDoOutput(true);
http.setDoInput(true);
out = new ObjectOutputStream(http.getOutputStream());
out.writeObject(t);
web.xml
<filter>
<filter-name>Set Response Character Encoding</filter-name>
<filter-class>net.abdullahcodes.serv.MyFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>Set Response Character Encoding</filter-name>
<url-pattern>/TradableReceiver</url-pattern>
<url-pattern>/*</url-pattern>
<url-pattern>/</url-pattern>
</filter-mapping>
<locale-encoding-mapping-list>
<locale-encoding-mapping>
<locale>ar</locale>
<encoding>UTF-8</encoding>
</locale-encoding-mapping>
<locale-encoding-mapping>
<locale>en</locale>
<encoding>UTF-8</encoding>
</locale-encoding-mapping>
</locale-encoding-mapping-list>
MyFilter
Copied from Omri Spector answer on This
glassfish-web.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE glassfish-web-app PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Servlet 3.0//EN" "http://glassfish.org/dtds/glassfish-web-app_3_0-1.dtd">
<glassfish-web-app>
<jsp-config>
</jsp-config>
<parameter-encoding default-charset="UTF-8" />
</glassfish-web-app>
Servlet test received Serializable object:
log("sys: "+System.getProperty("file.encoding"));
log("def: "+Charset.defaultCharset());
log("size: "+b.totalRowsCount()+", "+b.totalColumnsCount());
log("test arabic: هلوووووووووويااا");
System.out.println("test sysout: اوووه خطبها نصيب");
while (b.hasNext()) {
Position p = new Position();
p.setEn(b.next());
p.setAr(b.next());
log("p: "+p.toString());
}
Console output on Glassfish:
log():net.abdullahcodes.serv.TradableReceiver: sys: Cp1252
log():net.abdullahcodes.serv.TradableReceiver: def: windows-1252
log():net.abdullahcodes.serv.TradableReceiver: size: 4, 2
log():net.abdullahcodes.serv.TradableReceiver: test arabic: ????????????????
Info: test sysout: ????? ????? ????
log():net.abdullahcodes.serv.TradableReceiver: p: id: 0, en: fatima, ar: abod
log():net.abdullahcodes.serv.TradableReceiver: p: id: 0, en: maryam, ar: nora
log():net.abdullahcodes.serv.TradableReceiver: p: id: 0, en: ????, ar: ????
log():net.abdullahcodes.serv.TradableReceiver: p: id: 0, en: ????, ar: ????
Console output on Tomcat:
log INFO: net.abdullahcodes.serv.TradableReceiver: sys: UTF-8
log INFO: net.abdullahcodes.serv.TradableReceiver: def: UTF-8
log INFO: net.abdullahcodes.serv.TradableReceiver: size: 4, 2
log INFO: net.abdullahcodes.serv.TradableReceiver: test arabic: هلوووووووووويااا
test sysout: اوووه خطبها نصيب
log INFO: net.abdullahcodes.serv.TradableReceiver: p: id: 0, en: fatima, ar: abod
log INFO: net.abdullahcodes.serv.TradableReceiver: p: id: 0, en: maryam, ar: nora
log INFO: net.abdullahcodes.serv.TradableReceiver: p: id: 0, en: احمد, ar: صالح
log INFO: net.abdullahcodes.serv.TradableReceiver: p: id: 0, en: حسين, ar:

You need to set the command line property:
-Dfile.encoding=UTF-8
when starting Glassfish.
If you're starting from your IDE then you need to add this setting to the launch configuration.
If Glassfish is being started as a service then you need to set an environment variable:
JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF-8

Related

No mapping found with #RestController an #RequestMapping

I have the following Controller
#RestController("/person")
public class PersonController {
#Autowired
PersonService personService;
#RequestMapping(value = "/list",
method = RequestMethod.GET,
produces = MediaType.APPLICATION_JSON_VALUE
)
public List<PersonNode> getPersons(){
return personService.getList();
}
}
Now the spring neo4j config:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd">
<!-- Scan the JavaConfig -->
<context:annotation-config/>
<context:component-scan base-package="server.infrastructure.repositories.neo4j.config" />
</beans>
and spring mvc rest config:
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc.xsd">
<!--Used for Spring MVC configuration - must have-->
<mvc:annotation-driven />
<!-- This shows where to scan for rest controller -->
<context:component-scan base-package="server.api.rest.controller" />
</beans>
and web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
version="3.1">
<display-name>Restful Web Application with Spring MVC 4.0.5x</display-name>
<!-- Root App Context -->
<!-- The definition of the Root Spring Context Container shared by all Servlets and Filters -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:spring/ApplicationContext.xml</param-value>
</context-param>
<!-- Bootstrap the root application context.Creates the Spring Container shared by all Servlets and Filters -->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<!-- Web App Settings -->
<!-- Processes application requests -->
<servlet>
<servlet-name>MR.rest.api</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet </servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/SpringMVC/SpringMVC-RESTContext.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>MR.rest.api</servlet-name>
<url-pattern>/rest/*</url-pattern>
</servlet-mapping>
</web-app>
However when I refer to http://localhost:8080/rest/person/list i keep getting the:
[http-bio-8080-exec-2] WARN o.s.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/rest/person/list] in DispatcherServlet with name 'MR.rest.api'
with my Tomcat startup log:
...
INFO: Initializing Spring root WebApplicationContext
01:50:55.703 [localhost-startStop-1] INFO o.s.web.context.ContextLoader - Root WebApplicationContext: initialization started
01:50:55.774 [localhost-startStop-1] INFO o.s.w.c.s.XmlWebApplicationContext - Refreshing Root WebApplicationContext: startup date [Wed Dec 16 01:50:55 CET 2015]; root of context hierarchy
01:50:55.805 [localhost-startStop-1] INFO o.s.b.f.xml.XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [spring/ApplicationContext.xml]
01:50:55.879 [localhost-startStop-1] INFO o.s.b.f.xml.XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [spring/Neo4j-DataSources.xml]
01:50:56.254 [localhost-startStop-1] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'myNeo4jConfiguration' of type [class server.infrastructure.repositories.neo4j.config.MyNeo4jConfiguration$$EnhancerBySpringCGLIB$$7212f882] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
01:50:56.257 [localhost-startStop-1] INFO o.s.d.n.config.Neo4jConfiguration - Initialising PersistenceExceptionTranslationPostProcessor
01:50:56.683 [localhost-startStop-1] INFO o.n.o.m.info.ClassFileProcessor - Starting Post-processing phase
01:50:56.684 [localhost-startStop-1] INFO o.n.o.m.info.ClassFileProcessor - Building annotation class map
01:50:56.684 [localhost-startStop-1] INFO o.n.o.m.info.ClassFileProcessor - Building interface class map for 6 classes
01:50:56.684 [localhost-startStop-1] INFO o.n.o.m.info.ClassFileProcessor - Registering default type converters...
01:50:56.692 [localhost-startStop-1] INFO o.n.o.m.info.ClassFileProcessor - Post-processing complete
01:50:56.692 [localhost-startStop-1] INFO o.n.o.m.info.ClassFileProcessor - 6 classes loaded in 22 milliseconds
01:50:56.974 [localhost-startStop-1] INFO o.s.d.n.mapping.Neo4jMappingContext - Neo4jMappingContext initialisation completed
01:50:57.088 [localhost-startStop-1] INFO o.s.d.n.config.Neo4jConfiguration - Initialising PersistenceExceptionTranslator
01:50:57.092 [localhost-startStop-1] INFO o.s.d.n.config.Neo4jConfiguration - Initialising PersistenceExceptionTranslationInterceptor
01:50:57.095 [localhost-startStop-1] INFO o.s.d.n.config.Neo4jConfiguration - Initialising Neo4jTransactionManager
01:50:57.130 [localhost-startStop-1] INFO o.s.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 1424 ms
01:50:57.161 [localhost-startStop-1] INFO o.s.web.servlet.DispatcherServlet - FrameworkServlet 'MR.rest.api': initialization started
gru 16, 2015 1:50:57 AM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring FrameworkServlet 'MR.rest.api'
01:50:57.165 [localhost-startStop-1] INFO o.s.w.c.s.XmlWebApplicationContext - Refreshing WebApplicationContext for namespace 'MR.rest.api-servlet': startup date [Wed Dec 16 01:50:57 CET 2015]; parent: Root WebApplicationContext
01:50:57.166 [localhost-startStop-1] INFO o.s.b.f.xml.XmlBeanDefinitionReader - Loading XML bean definitions from ServletContext resource [/WEB-INF/SpringMVC/SpringMVC-RESTContext.xml]
01:50:57.399 [localhost-startStop-1] INFO o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/list],methods=[GET],produces=[application/json]}" onto public java.util.List<server.infrastructure.persistence.neo4j.nodes.PersonNode> server.api.rest.controller.PersonController.getPersons()
01:50:57.626 [localhost-startStop-1] INFO o.s.w.s.m.m.a.RequestMappingHandlerAdapter - Looking for #ControllerAdvice: WebApplicationContext for namespace 'MR.rest.api-servlet': startup date [Wed Dec 16 01:50:57 CET 2015]; parent: Root WebApplicationContext
01:50:57.694 [localhost-startStop-1] INFO o.s.w.s.m.m.a.RequestMappingHandlerAdapter - Looking for #ControllerAdvice: WebApplicationContext for namespace 'MR.rest.api-servlet': startup date [Wed Dec 16 01:50:57 CET 2015]; parent: Root WebApplicationContext
01:50:57.758 [localhost-startStop-1] INFO o.s.w.s.h.BeanNameUrlHandlerMapping - Mapped URL path [/person] onto handler '/person'
01:50:57.826 [localhost-startStop-1] INFO o.s.web.servlet.DispatcherServlet - FrameworkServlet 'MR.rest.api': initialization completed in 665 ms
gru 16, 2015 1:50:57 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
However, when I refer to http://localhost:8080/rest/list I get the expected list of persons.
I want to refer to the http://localhost:8080/rest/person/list while using the #RestController for the person at class level and the `list' at the method level. How this can be done?
you should add #RequestMapping to your Controller Class
#RestController
#RequestMapping("/person")
public class PersonController {
#Autowired
PersonService personService;
#RequestMapping(value = "/list", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
public List<PersonNode> getPersons(){
return personService.getList();
}
}

Event ID: 1325, Source: ASP.NET 4.0.30319.0

Could any One Help Me Identify the Error and suggest a solution Please.
Log Name: Application
Source: ASP.NET 4.0.30319.0
Date: 3/6/2015 7:28:58 AM
Event ID: 1325
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer: XXX
Description:
An unhandled exception occurred and the process was terminated.
Application ID: /LM/W3SVC/3/ROOT
Process ID: 13528
Exception: System.Threading.ThreadStateException
Message: Unable to retrieve thread information.
StackTrace: at System.Threading.Thread.GetThreadStateNative()
at FiftyOne.Foundation.Mobile.Detection.NewDevice.Dispose()
at FiftyOne.Foundation.Mobile.Detection.NewDevice.Finalize()
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="ASP.NET 4.0.30319.0" />
<EventID Qualifiers="49152">1325</EventID>
<Level>2</Level>
<Task>0</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2015-03-06T13:28:58.000Z" />
<EventRecordID>173806</EventRecordID>
<Channel>Application</Channel>
<Computer>379501-dy.ord.intensive.int</Computer>
<Security />
</System>
<EventData>
<Data>An unhandled exception occurred and the process was terminated.
Application ID: /LM/W3SVC/3/ROOT
Process ID: 13528
Exception: System.Threading.ThreadStateException
Message: Unable to retrieve thread information.
StackTrace: at System.Threading.Thread.GetThreadStateNative()
at FiftyOne.Foundation.Mobile.Detection.NewDevice.Dispose()
at FiftyOne.Foundation.Mobile.Detection.NewDevice.Finalize()</Data>
</EventData>
</Event>
I got this error message today; my solution is to remove the module from my codebase. A tad extreme, but I don't want third-party modules that when they crash, kill the entire application pool.

IIS8 The Just-In-Time debugger was launched without necessary security permissions

Windows Server 2012 64 bit
IIS8
ASP.NET Framework 4
Trying to run an unmanaged DLL from my aspx page
Executing the DLL Function call gives:
The Just-In-Time debugger was launched without necessary security permissions. To debug this process, the Just-In-Time debugger must be run as an Administrator. Would you like to debug this process?
There is no debugger that I know of on the web server, trying to launch it gives errors.
Why is my call to my DLL crashing my aspnet worker process?
How can I tell IIS8 there is no debugger?
I have googled this extensively, and all the help seems to be about Visual Studio, not IIS. There is no Visual Studio on the web sever.
Here is the offending code.
private string regname = "";
private string fingerprint = "";
private string unlockingcode = "";
/// <summary>
/// called from page_load
/// </summary>
private void CreateUnlockingCode()
{
UInt32 lfp;
string sfp = fingerprint.Remove(4, 1);
lfp = Convert.ToUInt32(sfp, 16);
string bindir = Server.MapPath(#"~/bin/CodeGen64.dll"); //full path to the DLL "P:\\AFI2013\\bin\\CodeGen64.dll"
IntPtr pDll = NativeMethods.LoadLibrary(bindir); //attempt to load the library
try
{
IntPtr pAddressOfFunctionToCall = NativeMethods.GetProcAddress(pDll, "CreateCode2A");
CreateCode2 createCode2 = (CreateCode2)Marshal.GetDelegateForFunctionPointer(
pAddressOfFunctionToCall,
typeof(CreateCode2));
//THIS LINE CRASHES THE ASPNET WORKER PROCESS
unlockingcode = createCode2(1, regname, encrypt_template, lfp, (UInt16)0, (UInt16)0, (UInt16)0, (UInt16)0, (UInt16)0);
}
finally
{
bool result = NativeMethods.FreeLibrary(pDll);
}
}
And here is the Error from the Event Viewer.
Log Name: Application
Source: Application Error
Date: 7/10/2013 11:34:30 AM
Event ID: 1000
Task Category: (100)
Level: Error
Keywords: Classic
User: N/A
Computer: owl.INT.local
Description:
Faulting application name: w3wp.exe, version: 8.0.9200.16384, time stamp: 0x50108835
Faulting module name: ntdll.dll, version: 6.2.9200.16579, time stamp: 0x51637f77
Exception code: 0xc0000374
Fault offset: 0x00000000000ebd59
Faulting process id: 0x2608
Faulting application start time: 0x01ce7d9c1d409343
Faulting application path: c:\windows\system32\inetsrv\w3wp.exe
Faulting module path: C:\Windows\SYSTEM32\ntdll.dll
Report Id: 5b36e881-e98f-11e2-9406-000c2908dae4
Faulting package full name:
Faulting package-relative application ID:
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Application Error" />
<EventID Qualifiers="0">1000</EventID>
<Level>2</Level>
<Task>100</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2013-07-10T18:34:30.000000000Z" />
<EventRecordID>54586</EventRecordID>
<Channel>Application</Channel>
<Computer>owl.INT.local</Computer>
<Security />
</System>
<EventData>
<Data>w3wp.exe</Data>
<Data>8.0.9200.16384</Data>
<Data>50108835</Data>
<Data>ntdll.dll</Data>
<Data>6.2.9200.16579</Data>
<Data>51637f77</Data>
<Data>c0000374</Data>
<Data>00000000000ebd59</Data>
<Data>2608</Data>
<Data>01ce7d9c1d409343</Data>
<Data>c:\windows\system32\inetsrv\w3wp.exe</Data>
<Data>C:\Windows\SYSTEM32\ntdll.dll</Data>
<Data>5b36e881-e98f-11e2-9406-000c2908dae4</Data>
<Data>
</Data>
<Data>
</Data>
</EventData>
</Event>

spring hibernate sessionFactory NullPointerException

Hi I'm writing an application and I'm getting the following error.
Edit: Complete log
`
Aug 20, 2012 6:37:22 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre7\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;F:\SVN\bin\;F:\SVN\Python25\;C:\Program Files\PHP\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\MySQL\MySQL Server 5.5\bin;D:\apache-ant-1.8.2\bin;C:\Program Files\Java\jdk1.7.0\bin;C:\Program Files\QuickTime\QTSystem\
Aug 20, 2012 6:37:22 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:yogamandir1' did not find a matching property.
Aug 20, 2012 6:37:22 PM org.apache.coyote.AbstractProtocolHandler init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Aug 20, 2012 6:37:23 PM org.apache.coyote.AbstractProtocolHandler init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Aug 20, 2012 6:37:23 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1277 ms
Aug 20, 2012 6:37:23 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Aug 20, 2012 6:37:23 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.8
Aug 20, 2012 6:37:27 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/core_rt is already defined
Aug 20, 2012 6:37:27 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/core is already defined
Aug 20, 2012 6:37:27 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jsp/jstl/core is already defined
Aug 20, 2012 6:37:27 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/fmt_rt is already defined
Aug 20, 2012 6:37:27 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/fmt is already defined
Aug 20, 2012 6:37:27 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jsp/jstl/fmt is already defined
Aug 20, 2012 6:37:27 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jsp/jstl/functions is already defined
Aug 20, 2012 6:37:27 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://jakarta.apache.org/taglibs/standard/permittedTaglibs is already defined
Aug 20, 2012 6:37:27 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://jakarta.apache.org/taglibs/standard/scriptfree is already defined
Aug 20, 2012 6:37:27 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/sql_rt is already defined
Aug 20, 2012 6:37:27 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/sql is already defined
Aug 20, 2012 6:37:27 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jsp/jstl/sql is already defined
Aug 20, 2012 6:37:27 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/xml_rt is already defined
Aug 20, 2012 6:37:27 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/xml is already defined
Aug 20, 2012 6:37:27 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jsp/jstl/xml is already defined
Aug 20, 2012 6:37:27 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
INFO : org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization started
INFO : org.springframework.web.context.support.XmlWebApplicationContext - Refreshing Root WebApplicationContext: startup date [Mon Aug 20 18:37:28 IST 2012]; root of context hierarchy
INFO : org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from ServletContext resource [/WEB-INF/spring/root-context.xml]
INFO : org.springframework.beans.factory.support.DefaultListableBeanFactory - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory#d9ceea: defining beans []; root of factory hierarchy
INFO : org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 582 ms
Aug 20, 2012 6:37:28 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring FrameworkServlet 'appServlet'
INFO : org.springframework.web.servlet.DispatcherServlet - FrameworkServlet 'appServlet': initialization started
INFO : org.springframework.web.context.support.XmlWebApplicationContext - Refreshing WebApplicationContext for namespace 'appServlet-servlet': startup date [Mon Aug 20 18:37:28 IST 2012]; parent: Root WebApplicationContext
INFO : org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from ServletContext resource [/WEB-INF/spring/appServlet/servlet-context.xml]
INFO : org.springframework.context.annotation.ClassPathBeanDefinitionScanner - JSR-330 'javax.inject.Named' annotation found and supported for component scanning
INFO : org.springframework.beans.factory.config.PropertyPlaceholderConfigurer - Loading properties file from class path resource [jdbc.properties]
INFO : org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor - JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
INFO : org.springframework.beans.factory.support.DefaultListableBeanFactory - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory#659078: defining beans [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping#0,org.springframework.format.support.FormattingConversionServiceFactoryBean#0,org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter#0,org.springframework.web.servlet.handler.MappedInterceptor#0,org.springframework.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver#0,org.springframework.web.servlet.mvc.annotation.ResponseStatusExceptionResolver#0,org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver#0,org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping,org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter,org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter,org.springframework.web.servlet.resource.ResourceHttpRequestHandler#0,org.springframework.web.servlet.handler.SimpleUrlHandlerMapping#0,org.springframework.web.servlet.view.InternalResourceViewResolver#0,studentDAO,homeController,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping#1,org.springframework.format.support.FormattingConversionServiceFactoryBean#1,org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter#1,org.springframework.web.servlet.handler.MappedInterceptor#1,org.springframework.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver#1,org.springframework.web.servlet.mvc.annotation.ResponseStatusExceptionResolver#1,org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver#1,org.springframework.beans.factory.config.PropertyPlaceholderConfigurer#0,dataSource,sessionFactory,transactionManager,multipartResolver,org.springframework.aop.config.internalAutoProxyCreator,org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0,org.springframework.transaction.interceptor.TransactionInterceptor#0,org.springframework.transaction.config.internalTransactionAdvisor,org.springframework.context.annotation.ConfigurationClassPostProcessor$ImportAwareBeanPostProcessor#0]; parent: org.springframework.beans.factory.support.DefaultListableBeanFactory#d9ceea
INFO : org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping - Mapped "{[/register],methods=[POST],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String com.omkar.yogamandir.web.controllers.HomeController.register(java.util.Locale,org.springframework.ui.Model,com.omkar.yogamandir.web.beans.Student,org.springframework.web.multipart.MultipartFile,org.springframework.validation.BindingResult)
INFO : org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping - Mapped "{[/],methods=[GET],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String com.omkar.yogamandir.web.controllers.HomeController.home(java.util.Locale,org.springframework.ui.Model)
INFO : org.springframework.web.servlet.handler.SimpleUrlHandlerMapping - Mapped URL path [/resources/**] onto handler 'org.springframework.web.servlet.resource.ResourceHttpRequestHandler#0'
INFO : org.springframework.jdbc.datasource.DriverManagerDataSource - Loaded JDBC driver: com.mysql.jdbc.Driver
INFO : org.hibernate.cfg.annotations.Version - Hibernate Annotations 3.3.1.GA
INFO : org.hibernate.cfg.Environment - Hibernate 3.2.6
INFO : org.hibernate.cfg.Environment - hibernate.properties not found
INFO : org.hibernate.cfg.Environment - Bytecode provider name : cglib
INFO : org.hibernate.cfg.Environment - using JDK 1.4 java.sql.Timestamp handling
INFO : org.hibernate.cfg.AnnotationBinder - Binding entity from annotated class: com.omkar.yogamandir.entity.beans.BatchDTO
INFO : org.hibernate.cfg.annotations.EntityBinder - Bind entity com.omkar.yogamandir.entity.beans.BatchDTO on table batch
INFO : org.hibernate.cfg.AnnotationBinder - Binding entity from annotated class: com.omkar.yogamandir.entity.beans.StudentDTO
INFO : org.hibernate.cfg.annotations.EntityBinder - Bind entity com.omkar.yogamandir.entity.beans.StudentDTO on table student
INFO : org.hibernate.cfg.AnnotationConfiguration - Hibernate Validator not found: ignoring
INFO : org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean - Building new Hibernate SessionFactory
INFO : org.hibernate.connection.ConnectionProviderFactory - Initializing connection provider: org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider
INFO : org.hibernate.cfg.SettingsFactory - RDBMS: MySQL, version: 5.5.8
INFO : org.hibernate.cfg.SettingsFactory - JDBC driver: MySQL-AB JDBC Driver, version: mysql-connector-java-5.1.15 ( Revision: ${bzr.revision-id} )
INFO : org.hibernate.dialect.Dialect - Using dialect: org.hibernate.dialect.MySQLDialect
INFO : org.hibernate.transaction.TransactionFactoryFactory - Transaction strategy: org.springframework.orm.hibernate3.SpringTransactionFactory
INFO : org.hibernate.transaction.TransactionManagerLookupFactory - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
INFO : org.hibernate.cfg.SettingsFactory - Automatic flush during beforeCompletion(): disabled
INFO : org.hibernate.cfg.SettingsFactory - Automatic session close at end of transaction: disabled
INFO : org.hibernate.cfg.SettingsFactory - JDBC batch size: 15
INFO : org.hibernate.cfg.SettingsFactory - JDBC batch updates for versioned data: disabled
INFO : org.hibernate.cfg.SettingsFactory - Scrollable result sets: enabled
INFO : org.hibernate.cfg.SettingsFactory - JDBC3 getGeneratedKeys(): enabled
INFO : org.hibernate.cfg.SettingsFactory - Connection release mode: auto
INFO : org.hibernate.cfg.SettingsFactory - Maximum outer join fetch depth: 2
INFO : org.hibernate.cfg.SettingsFactory - Default batch fetch size: 1
INFO : org.hibernate.cfg.SettingsFactory - Generate SQL with comments: disabled
INFO : org.hibernate.cfg.SettingsFactory - Order SQL updates by primary key: disabled
INFO : org.hibernate.cfg.SettingsFactory - Order SQL inserts for batching: disabled
INFO : org.hibernate.cfg.SettingsFactory - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
INFO : org.hibernate.hql.ast.ASTQueryTranslatorFactory - Using ASTQueryTranslatorFactory
INFO : org.hibernate.cfg.SettingsFactory - Query language substitutions: {}
INFO : org.hibernate.cfg.SettingsFactory - JPA-QL strict compliance: disabled
INFO : org.hibernate.cfg.SettingsFactory - Second-level cache: enabled
INFO : org.hibernate.cfg.SettingsFactory - Query cache: disabled
INFO : org.hibernate.cfg.SettingsFactory - Cache provider: org.hibernate.cache.NoCacheProvider
INFO : org.hibernate.cfg.SettingsFactory - Optimize cache for minimal puts: disabled
INFO : org.hibernate.cfg.SettingsFactory - Structured second-level cache entries: disabled
INFO : org.hibernate.cfg.SettingsFactory - Echoing all SQL to stdout
INFO : org.hibernate.cfg.SettingsFactory - Statistics: disabled
INFO : org.hibernate.cfg.SettingsFactory - Deleted entity synthetic identifier rollback: disabled
INFO : org.hibernate.cfg.SettingsFactory - Default entity-mode: pojo
INFO : org.hibernate.cfg.SettingsFactory - Named query checking : enabled
INFO : org.hibernate.impl.SessionFactoryImpl - building session factory
INFO : org.hibernate.impl.SessionFactoryObjectFactory - Not binding factory to JNDI, no JNDI name configured
INFO : org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping - Mapped "{[/register],methods=[POST],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String com.omkar.yogamandir.web.controllers.HomeController.register(java.util.Locale,org.springframework.ui.Model,com.omkar.yogamandir.web.beans.Student,org.springframework.web.multipart.MultipartFile,org.springframework.validation.BindingResult)
INFO : org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping - Mapped "{[/],methods=[GET],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String com.omkar.yogamandir.web.controllers.HomeController.home(java.util.Locale,org.springframework.ui.Model)
INFO : org.springframework.orm.hibernate3.HibernateTransactionManager - Using DataSource [org.springframework.jdbc.datasource.DriverManagerDataSource#89eb77] of Hibernate SessionFactory for HibernateTransactionManager
INFO : org.springframework.web.servlet.DispatcherServlet - FrameworkServlet 'appServlet': initialization completed in 6021 ms
Aug 20, 2012 6:37:34 PM org.apache.coyote.AbstractProtocolHandler start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Aug 20, 2012 6:37:34 PM org.apache.coyote.AbstractProtocolHandler start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Aug 20, 2012 6:37:34 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 11556 ms
INFO : com.omkar.yogamandir.web.controllers.HomeController - Welcome home! the client locale is en_US
INFO : com.omkar.yogamandir.web.controllers.HomeController - Welcome home! the client locale is en_US
INFO : com.omkar.yogamandir.web.controllers.HomeController - Student Registration!
INFO : com.omkar.yogamandir.entity.dao.StudentDAO - Start: saveStudent() in StudentDAO class
java.lang.NullPointerException
at com.omkar.yogamandir.entity.dao.StudentDAO.saveStudent(StudentDAO.java:27)
at com.omkar.yogamandir.business.StudentBusinessAdapter.insertStudent(StudentBusinessAdapter.java:30)
at com.omkar.yogamandir.web.controllers.HomeController.register(HomeController.java:59)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:213)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:126)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:96)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:617)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:578)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:789)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:306)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:541)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:383)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:243)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:188)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:166)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:288)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
`
My StudentDAO class:
`package com.omkar.yogamandir.entity.dao;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;
import com.omkar.yogamandir.entity.beans.StudentDTO;
#Repository
#Transactional
public class StudentDAO {
private static final Logger logger = LoggerFactory
.getLogger(StudentDAO.class);
#Autowired
private SessionFactory sessionFactory;
public void saveStudent(StudentDTO studentDTO) {
try{
logger.info("Start: saveStudent() in StudentDAO class");
Session session = sessionFactory.getCurrentSession();
session.save(studentDTO);
logger.info("Successfully saved the student!!!");
} catch(Exception e){
e.printStackTrace();
}
}
}`
servlet-context.xml
`<?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd">
<!-- DispatcherServlet Context: defines this servlet's request-processing
infrastructure -->
<!-- Enables the Spring MVC #Controller programming model -->
<annotation-driven />
<!-- Handles HTTP GET requests for /resources/** by efficiently serving
up static resources in the ${webappRoot}/resources directory -->
<resources mapping="/resources/**" location="/resources/" />
<!-- Resolves views selected for rendering by #Controllers to .jsp resources
in the /WEB-INF/views directory -->
<beans:bean
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<beans:property name="prefix" value="/WEB-INF/views/" />
<beans:property name="suffix" value=".jsp" />
</beans:bean>
<context:component-scan base-package="com.omkar.yogamandir" />
<annotation-driven />
<context:property-placeholder location="classpath:jdbc.properties"></context:property-placeholder>
<beans:bean id="dataSource"
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<beans:property name="driverClassName" value="${jdbc.driverClassName}" />
<beans:property name="url" value="${jdbc.url}" />
<beans:property name="username" value="${jdbc.username}" />
<beans:property name="password" value="${jdbc.password}" />
</beans:bean>
<beans:bean id="sessionFactory"
class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
<beans:property name="dataSource" ref="dataSource"></beans:property>
<beans:property name="hibernateProperties">
<beans:props>
<beans:prop key="hibernate.dialect">${hibernate.dialect}</beans:prop>
<beans:prop key="hibernate.show_sql">${hibernate.show_sql}</beans:prop>
</beans:props>
</beans:property>
<beans:property name="packagesToScan" value="com.omkar.yogamandir"></beans:property>
</beans:bean>
<beans:bean id="transactionManager"
class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<beans:property name="sessionFactory" ref="sessionFactory"></beans:property>
</beans:bean>
<beans:bean id="multipartResolver"
class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
<beans:property name="maxUploadSize" value="5000000" />
</beans:bean>
<tx:annotation-driven />
</beans:beans>`
I have all the required jars in classpath. Please have a look at this issue.
sessionFactory is null when I use sessionFactory.getCurrentSession();
You couldn't inject the sessionFactory to studentDAO calss. Check on it

Flex Weblogic Blazeds Error

I have Flex/Parsley/Blazeds application deployed on weblogic 9.x. The following error appears in the weblogic logs the very first time I try connect to server side java class using remoting. After the first time the application works fine...bizzarre any ideas would be appreacited thanks.
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]
The weblogic logs show the following error:
<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)
I have included the WEB.XML for reference:
<?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>
The weblogic console startup is shown below:
[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 - turned on - WITH INITIAL REMOTING ERROR
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 - turned on - WITH SUCCESSFUL REMOTING CALL
[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)
You can check backport-util-concurrent.jar which must match your JDK.
It looks like you are calling a method that either doesn't exist or you are calling it with non-matching parameters.

Resources