Strange generated hibernate sql statement - sql
That is what i tried to do
session.get(Company.class, 1);
Hibernate:
select
company0_.Company_ID as Company1_31_4_,
company0_.version as version2_31_4_,
company0_.Address_ID as Address5_31_4_,
company0_.Company_Code as Company3_31_4_,
company0_.Company_Name as Company4_31_4_,
company0_.Phone_ID as Phone6_31_4_,
address1_.Address_ID as Address1_0_0_,
address1_.version as version2_0_0_,
address1_.Comapny_ID as Comapny4_0_0_,
address1_.Address as Address3_0_0_,
company2_.Company_ID as Company1_31_1_,
company2_.version as version2_31_1_,
company2_.Address_ID as Address5_31_1_,
company2_.Company_Code as Company3_31_1_,
company2_.Company_Name as Company4_31_1_,
company2_.Phone_ID as Phone6_31_1_,
phone3_.Phone_ID as Phone1_77_2_,
phone3_.version as version2_77_2_,
phone3_.Comapny_ID as Comapny5_77_2_,
phone3_.Fax_Number as Fax3_77_2_,
phone3_.Phone_Number as Phone4_77_2_,
company4_.Company_ID as Company1_31_3_,
company4_.version as version2_31_3_,
company4_.Address_ID as Address5_31_3_,
company4_.Company_Code as Company3_31_3_,
company4_.Company_Name as Company4_31_3_,
company4_.Phone_ID as Phone6_31_3_
from
greentk_final.Company company0_
left outer join
greentk_final.Address address1_
on company0_.Address_ID=address1_.Address_ID
left outer join
greentk_final.Company company2_
on address1_.Comapny_ID=company2_.Company_ID
left outer join
greentk_final.Phones phone3_
on company0_.Phone_ID=phone3_.Phone_ID
left outer join
greentk_final.Company company4_
on phone3_.Comapny_ID=company4_.Company_ID
where
company0_.Company_ID=?
Feb 04, 2014 1:58:11 AM org.hibernate.engine.jdbc.spi.SqlExceptionHelper logExceptions
WARN: SQL Error: 1054, SQLState: 42S22
Feb 04, 2014 1:58:11 AM org.hibernate.engine.jdbc.spi.SqlExceptionHelper logExceptions
ERROR: Unknown column 'address1_.Comapny_ID' in 'field list'
Feb 04, 2014 1:58:11 AM org.hibernate.event.internal.DefaultLoadEventListener onLoad
INFO: HHH000327: Error performing load command : org.hibernate.exception.SQLGrammarException: could not extract ResultSet
Exception in thread "main" org.hibernate.exception.SQLGrammarException: could not extract ResultSet
at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:82)
at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49)
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:125)
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:110)
at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:61)
at org.hibernate.loader.Loader.getResultSet(Loader.java:2036)
at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1836)
at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1815)
at org.hibernate.loader.Loader.doQuery(Loader.java:899)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:341)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:311)
at org.hibernate.loader.Loader.loadEntity(Loader.java:2117)
at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:82)
at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:72)
at org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:3927)
at org.hibernate.event.internal.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:460)
at org.hibernate.event.internal.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:429)
at org.hibernate.event.internal.DefaultLoadEventListener.load(DefaultLoadEventListener.java:206)
at org.hibernate.event.internal.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:145)
at org.hibernate.internal.SessionImpl.fireLoad(SessionImpl.java:1092)
at org.hibernate.internal.SessionImpl.immediateLoad(SessionImpl.java:1007)
at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:173)
at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:285)
at org.hibernate.engine.internal.StatefulPersistenceContext.unproxyAndReassociate(StatefulPersistenceContext.java:677)
at org.hibernate.event.internal.DefaultDeleteEventListener.onDelete(DefaultDeleteEventListener.java:90)
at org.hibernate.event.internal.DefaultDeleteEventListener.onDelete(DefaultDeleteEventListener.java:74)
at org.hibernate.internal.SessionImpl.fireDelete(SessionImpl.java:957)
at org.hibernate.internal.SessionImpl.delete(SessionImpl.java:936)
at main.Main.main(Main.java:53)
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'address1_.Comapny_ID' in 'field list'
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
at com.mysql.jdbc.Util.getInstance(Util.java:386)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1053)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4096)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4028)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2490)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2651)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2734)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2155)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2322)
at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:56)
... 24 more
package model;
import java.io.Serializable;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import model.calibration.AbstractModel;
/**
*
* #author Islam Morad
*/
#Entity
#Table(name = "Address")
public class Address extends AbstractModel implements Serializable {
/**
*
*/
private static final long serialVersionUID = 7162754693551897604L;
private long addressID;
private String street;
private Company company;
/**
* #return the addressID
*/
#Id
#GeneratedValue
#Column(name = "Address_ID", nullable = false)
public long getAddressID() {
return addressID;
}
/**
* #param addressID
* the addressID to set
*/
public void setAddressID(long addressID) {
this.addressID = addressID;
}
/**
* #return the street
*/
#Column(name = "Address", nullable = false)
public String getStreet() {
return street;
}
/**
* #param street
* the street to set
*/
public void setStreet(String street) {
this.street = street;
}
/**
* #return the company
*/
#OneToOne(cascade = CascadeType.ALL)
#JoinColumn(name = "Comapny_ID")
public Company getCompany() {
return company;
}
/**
* #param company
* the company to set
*/
public void setCompany(Company company) {
this.company = company;
}
}
Here is the full stack-trace again
Feb 06, 2014 9:20:26 AM org.hibernate.annotations.common.Version <clinit>
INFO: HCANN000001: Hibernate Commons Annotations {4.0.2.Final}
Feb 06, 2014 9:20:27 AM org.hibernate.Version logVersion
INFO: HHH000412: Hibernate Core {4.2.2.Final}
Feb 06, 2014 9:20:27 AM org.hibernate.cfg.Environment <clinit>
INFO: HHH000206: hibernate.properties not found
Feb 06, 2014 9:20:27 AM org.hibernate.cfg.Environment buildBytecodeProvider
INFO: HHH000021: Bytecode provider name : javassist
Feb 06, 2014 9:20:27 AM org.hibernate.cfg.Configuration configure
INFO: HHH000043: Configuring from resource: /main/hibernate.cfg.xml
Feb 06, 2014 9:20:27 AM org.hibernate.cfg.Configuration getConfigurationInputStream
INFO: HHH000040: Configuration resource: /main/hibernate.cfg.xml
Feb 06, 2014 9:20:28 AM org.hibernate.cfg.Configuration doConfigure
INFO: HHH000041: Configured SessionFactory: GreenTK
Feb 06, 2014 9:20:29 AM org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
INFO: HHH000402: Using Hibernate built-in connection pool (not for production use!)
Feb 06, 2014 9:20:29 AM org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
INFO: HHH000115: Hibernate connection pool size: 20
Feb 06, 2014 9:20:29 AM org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
INFO: HHH000006: Autocommit mode: false
Feb 06, 2014 9:20:29 AM org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
INFO: HHH000401: using driver [com.mysql.jdbc.Driver] at URL [jdbc:mysql://localhost:3306/testing]
Feb 06, 2014 9:20:29 AM org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
INFO: HHH000046: Connection properties: {user=root, password=****}
Feb 06, 2014 9:20:32 AM org.hibernate.dialect.Dialect <init>
INFO: HHH000400: Using dialect: org.hibernate.dialect.MySQLDialect
Feb 06, 2014 9:20:34 AM org.hibernate.engine.transaction.internal.TransactionFactoryInitiator initiateService
INFO: HHH000399: Using default transaction strategy (direct JDBC transactions)
Feb 06, 2014 9:20:34 AM org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory <init>
INFO: HHH000397: Using ASTQueryTranslatorFactory
Feb 06, 2014 9:20:34 AM org.hibernate.search.Version <clinit>
INFO: HSEARCH000034: Hibernate Search 4.3.0.Final
Feb 06, 2014 9:20:34 AM org.hibernate.search.impl.ConfigContext getLuceneMatchVersion
WARN: HSEARCH000075: Configuration setting hibernate.search.lucene_version was not specified, using LUCENE_CURRENT.
Feb 06, 2014 9:20:38 AM org.hibernate.internal.SessionFactoryRegistry addSessionFactory
WARN: HHH000277: Could not bind factory to JNDI
org.hibernate.service.jndi.JndiException: Error parsing JNDI name [GreenTK]
at o rg.hibernate.service.jndi.internal.JndiServiceImpl.parseName(JndiServiceImpl.java:92)
org.hibernate.service.jndi.internal.JndiServiceImpl.bind(JndiServiceImpl.java:108)
at org.hibernate.internal.SessionFactoryRegistry.addSessionFactory(SessionFactoryRegistry.java: 89)
at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:480)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1769)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1840)
at main.HibernateUtil.<clinit>(HibernateUtil.java:28)
at main.Main.main(Main.java:48)
Caused by: javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:307)
at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:344)
at javax.naming.InitialContext.getNameParser(InitialContext.java:499)
at org.hibernate.service.jndi.internal.JndiServiceImpl.parseName(JndiServiceImpl.java:86)
... 7 more
Hibernate:
select
company0_.Company_ID as Company1_31_4_,
company0_.version as version2_31_4_,
company0_.Address_ID as Address5_31_4_,
company0_.Company_Code as Company3_31_4_,
company0_.Company_Name as Company4_31_4_,
company0_.Phone_ID as Phone6_31_4_,
address1_.Address_ID as Address1_0_0_,
address1_.version as version2_0_0_,
address1_.Company_ID as Company4_0_0_,
address1_.Address as Address3_0_0_,
company2_.Company_ID as Company1_31_1_,
company2_.version as version2_31_1_,
company2_.Address_ID as Address5_31_1_,
company2_.Company_Code as Company3_31_1_,
company2_.Company_Name as Company4_31_1_,
company2_.Phone_ID as Phone6_31_1_,
phone3_.Phone_ID as Phone1_77_2_,
phone3_.version as version2_77_2_,
phone3_.Company_ID as Company5_77_2_,
phone3_.Fax_Number as Fax3_77_2_,
phone3_.Phone_Number as Phone4_77_2_,
company4_.Company_ID as Company1_31_3_,
company4_.version as version2_31_3_,
company4_.Address_ID as Address5_31_3_,
company4_.Company_Code as Company3_31_3_,
company4_.Company_Name as Company4_31_3_,
company4_.Phone_ID as Phone6_31_3_
from
testing.Company company0_
left outer join
testing.Address address1_
on company0_.Address_ID=address1_.Address_ID
left outer join
testing.Company company2_
on address1_.Company_ID=company2_.Company_ID
left outer join
testing.Phone phone3_
on company0_.Phone_ID=phone3_.Phone_ID
left outer join
testing.Company company4_
on phone3_.Company_ID=company4_.Company_ID
where
company0_.Company_ID=?
Your problem is a typo in address entity:
#JoinColumn(name = "Comapny_ID")
should be
#JoinColumn(name = "Company_ID")
Related
EJB-Wildfly: Is it fine to execute multiple EJB Scheduler in Wildfly or should i keep it in separate Class files?
There are 10 scheduler of this type in same Class file: #Startup #Singleton #AccessTimeout(value = 1, unit = TimeUnit.HOURS) public class MeowPoller { #Schedule(hour = "02", minute = "00", persistent = false) public void runFetchApplications() { When some job stuck for say 3 hours then next job does not execute till this job finish. System keeps on giving: 2020-01-20 01:02:00,001 WARN [org.jboss.as.ejb3.timer] (EJB default - 6) WFLYEJB0043: A previous execution of timer [id=459875b7-5346-40c1-a9a0-f36dec8ef53d timedObjectId=Meow-1.6-SNAPSHOT.Meow-1.6-SNAPSHOT.MeowPoller auto-timer?:true persistent?:false timerService=org.jboss.as.ejb3.timerservice.TimerServiceImpl#7ffe6c6a initialExpiration=null intervalDuration(in milli sec)=0 nextExpiration=Mon Jan 20 01:02:00 CET 2020 timerState=IN_TIMEOUT info=null] is still in progress, skipping this overlapping scheduled execution at: Mon Jan 20 01:02:00 CET 2020.
delay in arrayList processing vs String processing
Hello I have a question concerning data processing in groovy. I have a groovy step in which I call a method that gives me a list of json in return, then I parse it to test a value here is the code : props = get_device_properties(device_id) log.info "props = $props" log.info "size " + props.size() log.info "class " + props.class //props = jsonSlurper.parseText(props) log.info "***************************** t1" props.find(){ log.info it.name // check the field songTitle if (it.name == "songTitle") { // first check media if(init_correct == false) { log.info "init = " + it.value if (it.value == "UNKNOWN") found == true log.info "***************************** t2" here is a log of the process : Tue Jan 28 11:34:56 CET 2020: INFO: props = [[satisfied:true, href:... Tue Jan 28 11:35:03 CET 2020: INFO: size 31 Tue Jan 28 11:35:03 CET 2020: INFO: class class java.util.ArrayList Tue Jan 28 11:35:03 CET 2020: INFO: ***************************** t1 Tue Jan 28 11:35:03 CET 2020: INFO: songTitle Tue Jan 28 11:35:03 CET 2020: INFO: init = Sad But True Tue Jan 28 11:35:03 CET 2020: INFO: ***************************** t2 If I parse the map directly there is a gap of time between method return and start of the next processing : t2 - t1 is around 7s If 'get_device_properties' returns a String instead of the arrayList and I do a parseText (uncomment the 5th line) on this string, I don't have the extra processing time before I can parse the map Tue Jan 28 11:35:39 CET 2020: INFO: props = [{"satisfied":true,"href":... Tue Jan 28 11:35:39 CET 2020: INFO: size 25138 Tue Jan 28 11:35:39 CET 2020: INFO: class class java.lang.String Tue Jan 28 11:35:39 CET 2020: INFO: ***************************** t1 Tue Jan 28 11:35:39 CET 2020: INFO: songTitle Tue Jan 28 11:35:39 CET 2020: INFO: init = Sad But True Tue Jan 28 11:35:39 CET 2020: INFO: ***************************** t2 t2 - t1 = 0 can anyone help me to understand why this happens ? indeed, I usually tend to use the most straightforward way to implement my script ...
TestNG 6.10+ priority more important than preserve-order
I'm just working with some legacy code using TestNG framework in the 6.9.x version which I have to upgrade to the newer version of the framework - at least 6.11 . The problem is, many #Test annotations are marked with extra priorities attributes (#Test(priority = x)). But I've got a problem after change introduced in TestNG in the 6.10 release, namely: New: Hierarchy on order features (from less important to more important): groupByInstance, preserveOrder, priority, dependsOnGroups, dependsOnMethods Let's see an example of two test classes each containing three test methods with defined priorities: First class: public class TestClass1 { Logger LOG = Logger.getLogger("logger1"); #Test(priority = 2) public void methodB() { LOG.info("Method 1B"); } #Test(priority = 3) public void methodA() { LOG.info("Method 1A"); } #Test(priority = 1) public void methodC() { LOG.info("Method 1C"); } } The second one: public class TestClass2 { Logger LOG = Logger.getLogger("logger2"); #Test(priority = 1) public void methodC() { LOG.info("Method 2C"); } #Test(priority = 2) public void methodB() { LOG.info("Method 2B"); } #Test(priority = 3) public void methodA() { LOG.info("Method 2A"); } } ... and XML: <?xml version="1.0" encoding="UTF-8"?> <suite name="Suite" parallel="false"> <test name="Test" preserve-order="true"> <classes> <class name="com.test.radek.testngtest.TestClass2"/> <class name="com.test.radek.testngtest.TestClass1"/> </classes> </test> <!-- Test --> </suite> <!-- Suite --> After running such an XML suite, tests execution order is various for different TestNG releases: For 6.9.x: Apr 30, 2018 11:46:19 AM com.test.radek.testngtest.TestClass2 **methodC** Apr 30, 2018 11:46:19 AM com.test.radek.testngtest.TestClass2 **methodB** Apr 30, 2018 11:46:19 AM com.test.radek.testngtest.TestClass2 **methodA** Apr 30, 2018 11:46:19 AM com.test.radek.testngtest.TestClass1 **methodC** Apr 30, 2018 11:46:19 AM com.test.radek.testngtest.TestClass1 **methodB** Apr 30, 2018 11:46:19 AM com.test.radek.testngtest.TestClass1 **methodA** For 6.10 and higher: Apr 30, 2018 11:47:37 AM com.test.radek.testngtest.TestClass2 **methodC** Apr 30, 2018 11:47:37 AM com.test.radek.testngtest.TestClass1 **methodC** Apr 30, 2018 11:47:37 AM com.test.radek.testngtest.TestClass2 **methodB** Apr 30, 2018 11:47:37 AM com.test.radek.testngtest.TestClass1 **methodB** Apr 30, 2018 11:47:37 AM com.test.radek.testngtest.TestClass2 **methodA** Apr 30, 2018 11:47:37 AM com.test.radek.testngtest.TestClass1 **methodA** So on these two example we can see that starting from TestNG 6.10 the preserve-order is completely ignored by priorities. I saw a discussion regarding this preserve-order / priority correlation and now I'm no really sure how to handle this problem. Main question: Does TestNG have any mechanism which allows to execute tests according to priorities defined in #Test but grouped by a class (and the class order is defined in the XML suite) - so exactly as it was before TestNG 6.10 ?? What is the most correct way to migrate legacy tests relying on priorities and preserve-order to the new TestNG ?? Replacing the "priority" logic with dependsOnGroups could be very time-consuming for 1000+ test methods :/
Apache Ignite: Failed to load job class [class=org.apache.ignite.internal.processors.hadoop.v2.HadoopV2Job]
I am trying to start a server using the ignite.sh script and am getting the above error (failed to load HadoopV2Job). "config/default-config.xml" is being passed to CommandLineStartup and hasn't been changed. Has anyone came across this issue or does anyone know how to fix it? My Ignite version is 1.4.0 and here is the full stack trace: class org.apache.ignite.IgniteException: Failed to start processor: HadoopProcessor [idCtr=0] at org.apache.ignite.internal.util.IgniteUtils.convertException(IgniteUtils.java:881) at org.apache.ignite.Ignition.start(Ignition.java:349) at org.apache.ignite.startup.cmdline.CommandLineStartup.main(CommandLineStartup.java:302) Caused by: class org.apache.ignite.IgniteCheckedException: Failed to start processor: HadoopProcessor [idCtr=0] at org.apache.ignite.internal.IgniteKernal.startProcessor(IgniteKernal.java:1504) at org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:888) at org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1617) at org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1484) at org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:965) at org.apache.ignite.internal.IgnitionEx.startConfigurations(IgnitionEx.java:892) at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:784) at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:705) at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:576) at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:546) at org.apache.ignite.Ignition.start(Ignition.java:346) ... 1 more Caused by: class org.apache.ignite.IgniteCheckedException: Failed to load job class [class=org.apache.ignite.internal.processors.hadoop.v2.HadoopV2Job] at org.apache.ignite.internal.processors.hadoop.jobtracker.HadoopJobTracker.start(HadoopJobTracker.java:167) at org.apache.ignite.internal.processors.hadoop.HadoopProcessor.start(HadoopProcessor.java:103) at org.apache.ignite.internal.IgniteKernal.startProcessor(IgniteKernal.java:1501) ... 11 more Caused by: java.lang.IllegalArgumentException at org.objectweb.asm.ClassReader.<init>(Unknown Source) at org.objectweb.asm.ClassReader.<init>(Unknown Source) at org.objectweb.asm.ClassReader.<init>(Unknown Source) at org.apache.ignite.internal.processors.hadoop.HadoopClassLoader.hasExternalDependencies(HadoopClassLoader.java:288) at org.apache.ignite.internal.processors.hadoop.HadoopClassLoader.loadClass(HadoopClassLoader.java:162) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at org.apache.ignite.internal.processors.hadoop.jobtracker.HadoopJobTracker.start(HadoopJobTracker.java:163) ... 13 more
Shane, did you compile the Ignite code with JDK8 ? It looks like the org.objectweb.asm library failed to parse class "org.apache.ignite.internal.processors.hadoop.v2.HadoopV2Job" bytecode because the bytecode version is higher than 1.7: /** * Constructs a new {#link ClassReader} object. * * #param b * the bytecode of the class to be read. * #param off * the start offset of the class data. * #param len * the length of the class data. */ public ClassReader(final byte[] b, final int off, final int len) { this.b = b; // checks the class version if (readShort(off + 6) > Opcodes.V1_7) { throw new IllegalArgumentException(); } Please try to build Ignite witgh JDK 1.7 or specify target level = 1.7 with JDK8. Does that solve the problem?
Ria data corruption from server to client
I have a Linq query on the server side of a Silverlight 4 Ria project that returns a number of distinct items based on a time period(Month). The problem I am getting is when the client callback fires the data has been corrupted and all the items returned from the server are duplicates of the last item in the collection. Server Call Public Function GetBusinessHeadCountHistory(ByVal businessUnit As String) As IEnumerable(Of EngineeringHeadCountBusinessHistory) Return From t In ObjectContext.tblTimes Join h In ObjectContext.tblEngineeringDashboard_CADMachinesCounts On t.ID Equals h.TimeID Join b In ObjectContext.tblEngineeringDashboard_Business On h.BusinessID Equals b.ID Where b.BusinessUnit = businessUnit Order By t.Period Select New EngineeringHeadCountBusinessHistory With {.Month = t.Period, .BusinessUnit = b.BusinessUnit, .HeadCount = h.Count} End Function Client Callback Public Property EngineeringBusinessHistoryCount As ReadOnlyObservableCollection(Of EngineeringHeadCountBusinessHistory) Get Return _engineeringBusinessHistoryCount End Get Set(ByVal value As ReadOnlyObservableCollection(Of EngineeringHeadCountBusinessHistory)) _engineeringBusinessHistoryCount = value IsBusinessCountBusy = False RaisePropertyChanged("ChildReportTitle") RaisePropertyChanged("EngineeringBusinessHistoryCount") End Set End Property I have confirmed that the Linq query is correct from the server and in LinqPad. Any ideas?? EDIT : Fiddler RAW repsonse HTTP/1.1 200 OK Cache-Control: no-cache Pragma: no-cache Content-Length: 1738 Content-Type: application/msbin1 Expires: -1 Server: Microsoft-IIS/6.0 MicrosoftOfficeWebServer: 5.0_Pub X-Powered-By: ASP.NET X-AspNet-Version: 4.0.30319 Date: Thu, 30 Jun 2011 11:08:47 GMT ##GetBusinessHeadCountHistoryResponsehttp://tempuri.org/#!GetBusinessHeadCountHistoryResult aDomainServices i)http://www.w3.org/2001/XMLSchema-instance^ TotalCount�^ RootResults b<http://schemas.datacontract.org/2004/07/EngineeringDashboard_#EngineeringHeadCountBusinessHistory_BusinessUnit� skid-steer_ HeadCount�_Month����~�X�_#EngineeringHeadCountBusinessHistory_BusinessUnit� skid-steer_ HeadCount�_Month��#���p�_#EngineeringHeadCountBusinessHistory_BusinessUnit� skid-steer_ HeadCount�_Month��#DE��_#EngineeringHeadCountBusinessHistory_BusinessUnit� skid-steer_ HeadCount�_Month���hE��_#EngineeringHeadCountBusinessHistory_BusinessUnit� skid-steer_ HeadCount�_Month���w`ض�_#EngineeringHeadCountBusinessHistory_BusinessUnit� skid-steer_ HeadCount�_Month��#E�4��_#EngineeringHeadCountBusinessHistory_BusinessUnit� skid-steer_ HeadCount�_Month����{���_#EngineeringHeadCountBusinessHistory_BusinessUnit� skid-steer_ HeadCount� _Month���x�#��_#EngineeringHeadCountBusinessHistory_BusinessUnit� skid-steer_ HeadCount� _Month��#F��_#EngineeringHeadCountBusinessHistory_BusinessUnit� skid-steer_ HeadCount� _Month�����/�_#EngineeringHeadCountBusinessHistory_BusinessUnit� skid-steer_ HeadCount�"_Month���y�nG�_#EngineeringHeadCountBusinessHistory_BusinessUnit� skid-steer_ HeadCount�"_Month�����_�_#EngineeringHeadCountBusinessHistory_BusinessUnit� skid-steer_ HeadCount�"_Month�����]w�_#EngineeringHeadCountBusinessHistory_BusinessUnit� skid-steer_ HeadCount�$_Month���z���_#EngineeringHeadCountBusinessHistory_BusinessUnit� skid-steer_ HeadCount�$_Month��� ����_#EngineeringHeadCountBusinessHistory_BusinessUnit� skid-steer_ HeadCount�$_Month��#���� Phil
First, use Fiddler to check wether raw server response is correct ot not.
The problem was down to the POCO class Key annotation being on a non-unique field. I have changed it around to the unique Month property and it now works as expected. Strange error though... Imports System.ComponentModel.DataAnnotations Imports System.Runtime.Serialization Public Class EngineeringHeadBUHistory '<Key()> '<DataMember()> _ 'Property BusinessUnit As String <Key()> <DataMember()> Property Month As Date <DataMember()> _ Property HeadCount As Integer End Class