delay in arrayList processing vs String processing - arraylist

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 ...

Related

Agora: Why my m3u8 file does not contain timestamp?

I'm using agora composition recording and want to retrieve the start timestamp to build Synchronous playback.
The document says You can find the start timestamp at the start of each M3U8 file, however my M3U8 file does not contain any timestamp.
I can convert the output files (ts and m3u8) to mp4 by ffmpeg as expected.
The request body for start api is below;
const url = `${agoraApi}/v1/apps/${appId}/cloud_recording/resourceid/${resourceId}/mode/mix/start`
const body = {
cname,
uid,
clientRequest: {
token,
storageConfig: {
vendor: 1, // Amazon S3,
region: 10, // AP_NORTHEAST_1
accessKey: process.env.AWS_ACCESS_KEY_ID,
secretKey: process.env.AWS_SECRET_ACCESS_KEY,
bucket: process.env.AWS_S3_BUCKET,
fileNamePrefix: ["records"],
},
recordingConfig: {
channelType: 1, // default. 0: Communication profile, 1: Live broadcast profile
// maxIdleTime: 30, // seconds (default)
transcodingConfig: {
width: 640, // default
height: 360, // default
fps: 15, // default
bitrate: 600,
mixedVideoLayout: 0, // default
},
},
},
};
The output M3U8 file
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-ALLOW-CACHE:YES
#EXT-X-TARGETDURATION:18
#EXTINF:16.038000
8893be119d40bbc66f7ef9a26a676a12_live-aea67a87-f821-4234-894b-1512fcdae181_20210603064340040.ts
#EXTINF:15.972000
8893be119d40bbc66f7ef9a26a676a12_live-aea67a87-f821-4234-894b-1512fcdae181_20210603064357105.ts
#EXTINF:16.038000
8893be119d40bbc66f7ef9a26a676a12_live-aea67a87-f821-4234-894b-1512fcdae181_20210603064413077.ts
#EXTINF:15.971000
8893be119d40bbc66f7ef9a26a676a12_live-aea67a87-f821-4234-894b-1512fcdae181_20210603064429115.ts
#EXTINF:16.039000
8893be119d40bbc66f7ef9a26a676a12_live-aea67a87-f821-4234-894b-1512fcdae181_20210603064445086.ts
#EXTINF:15.972000
8893be119d40bbc66f7ef9a26a676a12_live-aea67a87-f821-4234-894b-1512fcdae181_20210603064501125.ts
#EXTINF:15.972000
8893be119d40bbc66f7ef9a26a676a12_live-aea67a87-f821-4234-894b-1512fcdae181_20210603064517097.ts
#EXTINF:16.038000
8893be119d40bbc66f7ef9a26a676a12_live-aea67a87-f821-4234-894b-1512fcdae181_20210603064533069.ts
#EXTINF:15.972000
8893be119d40bbc66f7ef9a26a676a12_live-aea67a87-f821-4234-894b-1512fcdae181_20210603064549107.ts
#EXTINF:16.038000
8893be119d40bbc66f7ef9a26a676a12_live-aea67a87-f821-4234-894b-1512fcdae181_20210603064605079.ts
#EXTINF:15.972000
8893be119d40bbc66f7ef9a26a676a12_live-aea67a87-f821-4234-894b-1512fcdae181_20210603064621117.ts
#EXTINF:16.038000
8893be119d40bbc66f7ef9a26a676a12_live-aea67a87-f821-4234-894b-1512fcdae181_20210603064637088.ts
#EXTINF:11.679000
8893be119d40bbc66f7ef9a26a676a12_live-aea67a87-f821-4234-894b-1512fcdae181_20210603064653127.ts
#EXT-X-ENDLIST
Am i missing some configuration?
While you are correct to point out that there is no Epoch/Unix timestamp, there is a "timestamp" included the name of each segment. If you notice at the end of the name of the segments, is a human readable date and time.
for example, the first .ts file is named:
8893be119d40bbc66f7ef9a26a676a12_live-aea67a87-f821-4234-894b-1512fcdae181_20210603064340040.ts
If you split the name using the _ as the delimiter, the last element of the array is your timestamp. using the above name for example, the time-stamp would be 20210603064340040.
Taking this further you can break this down as:
yyyy mm dd hh mm ss ms
------------------------
2021 06 03 06 43 40 040
Using the next three files in the list we can see
8893be119d40bbc66f7ef9a26a676a12_live-aea67a87-f821-4234-894b-1512fcdae181_20210603064357105.ts
8893be119d40bbc66f7ef9a26a676a12_live-aea67a87-f821-4234-894b-1512fcdae181_20210603064413077.ts
8893be119d40bbc66f7ef9a26a676a12_live-aea67a87-f821-4234-894b-1512fcdae181_20210603064429115.ts
yyyy mm dd hh mm ss ms
------------------------
2021 06 03 06 43 57 105
2021 06 03 06 44 13 077
2021 06 03 06 44 29 115

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.

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 :/

React-big-calendar - sort(set order) allDay events

React big calendar receives an array with objects:
allDay: true
end: Sat Jan 13 2018 03:03:00 GMT+0200 (EET) {}
eventType: "video"
start: Sat Jan 13 2018 03:03:00 GMT+0200 (EET) {}
title: "0"
There can be 3 types of EventType - video, duration and audio,
but they are displaying completely in random order.
Image
Need an advice how to set an order?

Strange generated hibernate sql statement

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")