[
https://jira.jboss.org/jira/browse/JBIDE-3654?page=com.atlassian.jira.plu...
]
Anton Klimkovich commented on JBIDE-3654:
-----------------------------------------
No need to fix any code. You need to add only one string to smooks config file: <param
name="locale-language">en</param>
Result:
<resource-config selector="decoder:LongDate">
<resource>org.milyn.javabean.decoders.CalendarDecoder</resource>
<param name="format">EEE MMM dd HH:mm:ss z yyyy</param>
<param name="locale-language">en</param>
</resource-config>
This decoder exception was fixed in previous smooks version:
http://jira.codehaus.org/browse/MILYN-54
Look at main class that throws an exseption:
http://svn.codehaus.org/milyn/trunk/smooks-core/src/main/java/org/milyn/j...
Here you can see optional parameters that help now to solve this problem:
http://www.milyn.org/javadoc/v1.1/smooks/org/milyn/javabean/decoders/Loca...
Exception was thrown because I have Ru locale. And LocaleAwareDateDecoder class takes the
default one (locale = Ru):
protected Locale getLocale(final String languageCode, final String countryCode ) {
Locale locale = null;
if ( languageCode == null )
locale = Locale.getDefault();
else if ( countryCode == null )
locale = new Locale( languageCode.trim() );
else
locale = new Locale( languageCode.trim(), countryCode.trim() );
if ( verifyLocale )
if ( !isLocalInstalled( locale ) )
throw new SmooksConfigurationException( "Locale " + locale + " is
not available on this system.");
return locale;
}
http://svn.codehaus.org/milyn/trunk/smooks-core/src/main/java/org/milyn/j...
So, plz add to all projects a string to smooks config file where need to parce date:
<param name="locale-language">en</param>
Example Project "transform_XML2POJO" doesn't work by
default.
-------------------------------------------------------------
Key: JBIDE-3654
URL:
https://jira.jboss.org/jira/browse/JBIDE-3654
Project: Tools (JBoss Tools)
Issue Type: Bug
Components: smooks
Affects Versions: 3.0.0.CR2
Reporter: Anton Klimkovich
Assignee: Feng Qian
Fix For: 3.0.0.GA
Attachments: Example projects results.txt, exception.txt
EXECUTE: Download project to workspace
http://anonsvn.jboss.org/repos/jbosstools/workspace/grid/esb-example/tran...
EXECUTE: Add ESB Libraries to the project
EXECUTE: Deploy project to the server
EXECUTE: Start jboss-esb-server
EXECUTE: Run SendJMSMessage.java
ASSERT:
******************************************************************
21:22:03,720 INFO [STDOUT]
&&&&&&&&&&&&&&&&&&&&&&
MyJMSListenerAction
&&&&&&&&&&&&&&&&&&&&&&&&&&
21:22:03,720 INFO [STDOUT]
&&&&&&&&&&&&&&&&&&&&
MyJMSListenerAction
&&&&&&&&&&&&&&&&&&&&&&&&&&&&
21:22:03,720 INFO [STDOUT]
&&&&&&&&&&&&&&&&&&&&&&
MyJMSListenerAction
&&&&&&&&&&&&&&&&&&&&&&&&&&
21:22:03,752 INFO [STDOUT] >>>> Message after Smooks intermediate xml ->
target pojos : :
21:22:03,752 INFO [STDOUT] [Demonstrates Smooks ability to rip the XML into Objects
********* DVDStoreAction - Order Value Objects Populated *********
Header: 1, null, 0, 59.97, 64.92, 4.95,
Customer: user1,Harry,Fletcher,SD
Order Items (2):
0: 1,1,364,The 40-Year-Old Virgin ,29.98
1: 2,1,299,Pulp Fiction,29.99
****************************************************************** ]
FAILURE: java.text.ParseException: Unparseable date: "Wed Nov 15 13:45:28
2006"
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira