codenameone / CodenameOne

Cross-platform framework for building truly native mobile apps with Java or Kotlin. Write Once Run Anywhere support for iOS, Android, Desktop & Web.
https://www.codenameone.com/
Other
1.72k stars 408 forks source link

org.xmlvm._nNotYetImplementedException #1663

Closed luiz04nl closed 8 years ago

luiz04nl commented 8 years ago

When I try to compile the generated code within Visual Studio generates the following error:

Exception thrown: 'System.Net.WebException' in System.Windows.ni.dll Exception thrown: 'System.Net.WebException' in System.Windows.ni.dll Exception thrown: 'org.xmlvm._nNotYetImplementedException' in Main.DLL Exception thrown: 'org.xmlvm._nExceptionAdapter' in Main.DLL Stack traces aren't supported at the moment java.lang.RuntimeException: org.xmlvm._nNotYetImplementedException: XMLVM: Not Yet Implemented: Red class access removed: com.ibm.icu.util.TimeZone getTimeZone

at java.util.SimpleTimeZone_21.run()

at java.security.AccessController.doPrivileged(PrivilegedAction n1)

at java.util.SimpleTimeZone.getICUTimeZone(String n1)

at java.util.SimpleTimeZone.this(Int32 n1, String n2, Int32 n3, Int32 n4, Int32 n5, Int32 n6, Int32 n7, Int32 n8, Int32 n9, Int32 n10, Int32 n11)

at java.util.SimpleTimeZone.this(Int32 n1, String n2, Int32 n3, Int32 n4, Int32 n5, Int32 n6, Int32 n7, Int32 n8, Int32 n9, Int32 n10)

at java.util.TimeZones.getTimeZones()

at java.util.TimeZone.initializeAvailable()

at java.util.TimeZone.getTimeZone(String n1)

at com.codename1.l10n.SimpleDateFormat.parse(String n1)

at br.com.liquidity.agenda.vilhena.JsonInternoInicial.getArrayClassificados(InputStream n1) The thread 0xc30 has exited with code 0 (0x0).

It runs smoothly on ios by xcode

luiz04nl commented 8 years ago

that the code that generates the failure:

            Date d = new Date();
            SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
            try {
                d = new Date(format.parse(dataClassifcado).getTime());
            } catch (ParseException ex) {
                ex.printStackTrace();
            }

I'm trying to get a date through a string, an alternative implementation could solve the problem?

codenameone commented 8 years ago

We are rewriting the C# vm from scratch so issues in the VM itself will become irrelevant. We are no longer actively fixing issues in XMLVM.