Bubi gupta

Greenhorn
+ Follow
since Sep 21, 2009
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Bubi gupta

Can anybody kindly tell me how feasible is long polling using simple java?If possible can anybody help me out with any tutorial ,source code?I am not getting enough help relating to java from net('');
13 years ago
Our client will be a simple java application.It will do long polling.
13 years ago
Hi, Renu

This is very easily possible in java.Just give a search with a proper keyword .The souce code is also very easily available.You probably need to use proper API calls.Check the net.
13 years ago
Actually the client should poll the server for an event or events.I am trying to implement that using http long polling.
If there is any sample code any docementation that will be of great help.
13 years ago
can anybody please help me out with any tutorial or documentation or any source code in java regarding the Http Long polling?
I am trying to implement this in java.
13 years ago
One thing I like to know that wether I should be bothered or not about the method calls of the
getValueAt(int rowIndex, int columnIndex) in the table model and the getTableCellRendererComponent () method in the renderer.
I should assume that how the parameters in those method increments is solely determined by java's own UI logic during rendering.
I should not be much bothered about that wright?('');

The renderer asks the model to supply data to paint.If I keep this basic thing in mind will that be sufficient?

One more thing,so basically what things I need to keep in mind during the usages of this method?Just what they do or any specific thing during the method handling?

Thanks once again in advance for you support.
13 years ago
Can anybody please help me in clarifying my above posted question ? I am really having trouble catching the concept?
13 years ago
Thanks for all your valuable reply.
Just one thing I like to know that so I should not be bothered about the method calls of the
getValueAt(int rowIndex, int columnIndex) in the table model and the getTableCellRendererComponent () method in the renderer.
I should assume that how the parameters in those method increments is solely determined by java's own UI logic during rendering.
I should not be much bothered about that wright?('');

One more thing,so basically what things I need to keep in mind during the usages of this method?Just what they do or any specific thing during the method handling?

Thanks once again in advance for you support.

13 years ago
Actually am trying to figure out how the parameters are set in the method getTableCellRendererComponent ().Actually this method has a parameter "Object value" which changes continuosly .This value is supplied from the Tabel Model I believe.So I want to know what actually is the relation?
And who actually changes the parameter in the getValueAt(int rowIndex, int columnIndex) method in the Table modal i.e how the rowIndex and columnIndex values are changing.

The actual picture is not very clear.Please help me('');
Thanks a lot in advance.
13 years ago
Normally in table cell rendering we implement this method getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column).The Object value parameter in the method is probably retrieved from the Object getValueAt(int rowIndex, int columnIndex) method in the Table modal.

Hence inoder to get the exact specific cell datas from the entire table the rowIndex and columnIndex should increment also and this values I think are actually passed to the parameter (Object value) in the method getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column).

I am not getting any idea actually how the rowIndex and the columnIndex in this method Object getValueAt(int rowIndex, int columnIndex) is automatically incrementing?Because this changed value is ultimately passed to the getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column).

Please help me out with this problem.I am not getting any clear help from any source.
Thanks in advance
13 years ago
Hi tabiul mahmood,

Thanks for your wonderful support.I have finally managed to complete the project by adding asm-jar file.But its really difficult to add the the exact jar files according to the project requirements if one doesnot know the jar files.


Hi Vijitha,

The strange errors ultimately removed...But it was replaced by another errors.

Let me first tell you the jar files I am using are...

mysql.jar
slf4j-api-1.5.2.jar
slf4j-jdk14-1.5.2.jar
hibernate3.jar
dom4j-1.6.1.jar
javassist-3.4.ga.jar
commons-collections-3.2.1.jar
jta-1.1.jar
antlr-2.7.6.jar
commons-logging-1.1.1.jar
cglib-2.2.jar.

Now the files are..




The error I am getting is...
Sep 22, 2009 1:03:21 AM org.hibernate.cfg.Environment <clinit>
INFO: Hibernate 3.2.4.sp1
Sep 22, 2009 1:03:21 AM org.hibernate.cfg.Environment <clinit>
INFO: hibernate.properties not found
Sep 22, 2009 1:03:21 AM org.hibernate.cfg.Environment buildBytecodeProvider
INFO: Bytecode provider name : cglib
Sep 22, 2009 1:03:21 AM org.hibernate.cfg.Environment <clinit>
INFO: using JDK 1.4 java.sql.Timestamp handling
Sep 22, 2009 1:03:21 AM org.hibernate.cfg.Configuration configure
INFO: configuring from resource: /hibernate.cfg.xml
Sep 22, 2009 1:03:21 AM org.hibernate.cfg.Configuration getConfigurationInputStream
INFO: Configuration resource: /hibernate.cfg.xml
Sep 22, 2009 1:03:21 AM org.hibernate.cfg.Configuration addResource
INFO: Reading mappings from resource : com/sample/Person.hbm.xml
Sep 22, 2009 1:03:22 AM org.hibernate.cfg.HbmBinder bindRootPersistentClassCommonValues
INFO: Mapping class: com.sample.person -> Person
Sep 22, 2009 1:03:22 AM org.hibernate.cfg.Configuration doConfigure
INFO: Configured SessionFactory: null
Sep 22, 2009 1:03:22 AM org.hibernate.connection.DriverManagerConnectionProvider configure
INFO: Using Hibernate built-in connection pool (not for production use!)
Sep 22, 2009 1:03:22 AM org.hibernate.connection.DriverManagerConnectionProvider configure
INFO: Hibernate connection pool size: 20
Sep 22, 2009 1:03:22 AM org.hibernate.connection.DriverManagerConnectionProvider configure
INFO: autocommit mode: false
Sep 22, 2009 1:03:22 AM org.hibernate.connection.DriverManagerConnectionProvider configure
INFO: using driver: com.mysql.jdbc.Driver at URL: jdbc:MySQL://127.0.0.1:3306/mysql
Sep 22, 2009 1:03:22 AM org.hibernate.connection.DriverManagerConnectionProvider configure
INFO: connection properties: {user=root, password=****}
Sep 22, 2009 1:03:22 AM org.hibernate.cfg.SettingsFactory buildSettings
INFO: RDBMS: MySQL, version: 5.0.51b-community-nt
Sep 22, 2009 1:03:22 AM org.hibernate.cfg.SettingsFactory buildSettings
INFO: JDBC driver: MySQL-AB JDBC Driver, version: mysql-connector-java-5.1.8 ( Revision: ${svn.Revision} )
Sep 22, 2009 1:03:22 AM org.hibernate.dialect.Dialect <init>
INFO: Using dialect: org.hibernate.dialect.MySQLInnoDBDialect
Sep 22, 2009 1:03:22 AM org.hibernate.transaction.TransactionFactoryFactory buildTransactionFactory
INFO: Transaction strategy: org.hibernate.transaction.JDBCTransactionFactory
Sep 22, 2009 1:03:22 AM org.hibernate.transaction.TransactionManagerLookupFactory getTransactionManagerLookup
INFO: No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
Sep 22, 2009 1:03:22 AM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Automatic flush during beforeCompletion(): disabled
Sep 22, 2009 1:03:22 AM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Automatic session close at end of transaction: disabled
Sep 22, 2009 1:03:22 AM org.hibernate.cfg.SettingsFactory buildSettings
INFO: JDBC batch size: 15
Sep 22, 2009 1:03:22 AM org.hibernate.cfg.SettingsFactory buildSettings
INFO: JDBC batch updates for versioned data: disabled
Sep 22, 2009 1:03:22 AM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Scrollable result sets: enabled
Sep 22, 2009 1:03:22 AM org.hibernate.cfg.SettingsFactory buildSettings
INFO: JDBC3 getGeneratedKeys(): enabled
Sep 22, 2009 1:03:22 AM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Connection release mode: auto
Sep 22, 2009 1:03:22 AM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Maximum outer join fetch depth: 2
Sep 22, 2009 1:03:22 AM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Default batch fetch size: 1
Sep 22, 2009 1:03:22 AM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Generate SQL with comments: disabled
Sep 22, 2009 1:03:22 AM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Order SQL updates by primary key: disabled
Sep 22, 2009 1:03:22 AM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Order SQL inserts for batching: disabled
Sep 22, 2009 1:03:22 AM org.hibernate.cfg.SettingsFactory createQueryTranslatorFactory
INFO: Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
Sep 22, 2009 1:03:22 AM org.hibernate.hql.ast.ASTQueryTranslatorFactory <init>
INFO: Using ASTQueryTranslatorFactory
Sep 22, 2009 1:03:22 AM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Query language substitutions: {}
Sep 22, 2009 1:03:22 AM org.hibernate.cfg.SettingsFactory buildSettings
INFO: JPA-QL strict compliance: disabled
Sep 22, 2009 1:03:22 AM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Second-level cache: enabled
Sep 22, 2009 1:03:22 AM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Query cache: disabled
Sep 22, 2009 1:03:22 AM org.hibernate.cfg.SettingsFactory createCacheProvider
INFO: Cache provider: org.hibernate.cache.HashtableCacheProvider
Sep 22, 2009 1:03:22 AM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Optimize cache for minimal puts: disabled
Sep 22, 2009 1:03:22 AM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Structured second-level cache entries: disabled
Sep 22, 2009 1:03:22 AM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Statistics: disabled
Sep 22, 2009 1:03:22 AM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Deleted entity synthetic identifier rollback: disabled
Sep 22, 2009 1:03:22 AM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Default entity-mode: pojo
Sep 22, 2009 1:03:22 AM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Named query checking : enabled
Sep 22, 2009 1:03:23 AM org.hibernate.impl.SessionFactoryImpl <init>
INFO: building session factory
Initial SessionFactory creation failed.java.lang.NoClassDefFoundError: org/objectweb/asm/Type
java.lang.NoClassDefFoundError: org/objectweb/asm/Type
at net.sf.cglib.core.TypeUtils.parseType(TypeUtils.java:180)
at net.sf.cglib.core.KeyFactory.<clinit>(KeyFactory.java:66)
at net.sf.cglib.proxy.Enhancer.<clinit>(Enhancer.java:69)
at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:117)
at org.hibernate.proxy.pojo.cglib.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:43)
at org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:162)
at org.hibernate.tuple.entity.AbstractEntityTuplizer.<init>(AbstractEntityTuplizer.java:135)
at org.hibernate.tuple.entity.PojoEntityTuplizer.<init>(PojoEntityTuplizer.java:55)
at org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping.<init>(EntityEntityModeToTuplizerMapping.java:56)
at org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:295)
at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:434)
at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:109)
at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:226)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294)
at com.sample.SessionFactoryUtil.<clinit>(SessionFactoryUtil.java:18)
at com.sample.TestPerson.main(TestPerson.java:11)
Exception in thread "main" java.lang.NullPointerException
at com.sample.TestPerson.main(TestPerson.java:11)

Please let me know if you find any solution.Thanks for your kind perusal.

Hi Vijitha,

Thank you so much for your reply.It has now got no problem with the SessionFactory.But I found a strange error...

Sep 21, 2009 11:11:11 PM org.hibernate.dialect.Dialect <init>
INFO: Using dialect: org.hibernate.dialect.DB2Dialect
Sep 21, 2009 11:11:12 PM org.hibernate.dialect.Dialect <init>
INFO: Using dialect: org.hibernate.dialect.DB2Dialect
Sep 21, 2009 11:11:12 PM org.hibernate.dialect.Dialect <init>
INFO: Using dialect: org.hibernate.dialect.DB2Dialect
Sep 21, 2009 11:11:12 PM org.hibernate.dialect.Dialect <init>
INFO: Using dialect: org.hibernate.dialect.DB2Dialect
/*foo*/ select * from ( select rownumber() over() as rownumber_, * from foos ) as temp_ where rownumber_ between ?+1 and ?
/*foo*/ select * from ( select rownumber() over() as rownumber_, row_.* from ( select distinct * from foos ) as row_ ) as temp_ where rownumber_ between ?+1 and ?
/*foo*/ select * from ( select rownumber() over(order by foo.bar, foo.baz) as rownumber_, * from foos foo order by foo.bar, foo.baz ) as temp_ where rownumber_ between ?+1 and ?
/*foo*/ select * from ( select rownumber() over() as rownumber_, row_.* from ( select distinct * from foos foo order by foo.bar, foo.baz ) as row_ ) as temp_ where rownumber_ between ?+1 and ?

Please help me out to fix the problem.I am actually a beginner in hibernate.Thanks a ton for your earnest support.

Thanking you
BUBI


Hi,myself BUBI
I have started learning hibernate recently.I faced a strange error.I am using eclipse as the IDE.Please help me to fix the problem.





the error I am getting is....
Sep 21, 2009 2:51:09 PM org.hibernate.cfg.Environment <clinit>
INFO: Hibernate 3.2.4.sp1
Sep 21, 2009 2:51:09 PM org.hibernate.cfg.Environment <clinit>
INFO: hibernate.properties not found
Sep 21, 2009 2:51:09 PM org.hibernate.cfg.Environment buildBytecodeProvider
INFO: Bytecode provider name : cglib
Sep 21, 2009 2:51:09 PM org.hibernate.cfg.Environment <clinit>
INFO: using JDK 1.4 java.sql.Timestamp handling
Sep 21, 2009 2:51:09 PM org.hibernate.cfg.Configuration configure
INFO: configuring from resource: /hibernate.cfg.xml
Sep 21, 2009 2:51:09 PM org.hibernate.cfg.Configuration getConfigurationInputStream
INFO: Configuration resource: /hibernate.cfg.xml
Sep 21, 2009 2:51:10 PM org.hibernate.cfg.Configuration addResource
INFO: Reading mappings from resource : com/sample/Person.hbm.xml
Sep 21, 2009 2:51:10 PM org.hibernate.cfg.HbmBinder bindRootPersistentClassCommonValues
INFO: Mapping class: com.sample.person -> Person
Sep 21, 2009 2:51:10 PM org.hibernate.cfg.Configuration doConfigure
INFO: Configured SessionFactory: null
Sep 21, 2009 2:51:10 PM org.hibernate.connection.DriverManagerConnectionProvider configure
INFO: Using Hibernate built-in connection pool (not for production use!)
Sep 21, 2009 2:51:10 PM org.hibernate.connection.DriverManagerConnectionProvider configure
INFO: Hibernate connection pool size: 20
Sep 21, 2009 2:51:10 PM org.hibernate.connection.DriverManagerConnectionProvider configure
INFO: autocommit mode: false
Sep 21, 2009 2:51:11 PM org.hibernate.connection.DriverManagerConnectionProvider configure
INFO: using driver: com.mysql.jdbc.Driver at URL: jdbc:MySQL://127.0.0.1:3306/mysql
Sep 21, 2009 2:51:11 PM org.hibernate.connection.DriverManagerConnectionProvider configure
INFO: connection properties: {user=root, password=****}
Sep 21, 2009 2:51:11 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: RDBMS: MySQL, version: 5.0.51b-community-nt
Sep 21, 2009 2:51:11 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: JDBC driver: MySQL-AB JDBC Driver, version: mysql-connector-java-5.1.8 ( Revision: ${svn.Revision} )
Sep 21, 2009 2:51:11 PM org.hibernate.dialect.Dialect <init>
INFO: Using dialect: org.hibernate.dialect.MySQLInnoDBDialect
Sep 21, 2009 2:51:11 PM org.hibernate.transaction.TransactionFactoryFactory buildTransactionFactory
INFO: Transaction strategy: org.hibernate.transaction.JDBCTransactionFactory
Sep 21, 2009 2:51:11 PM org.hibernate.transaction.TransactionManagerLookupFactory getTransactionManagerLookup
INFO: No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
Sep 21, 2009 2:51:11 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Automatic flush during beforeCompletion(): disabled
Sep 21, 2009 2:51:11 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Automatic session close at end of transaction: disabled
Sep 21, 2009 2:51:11 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: JDBC batch size: 15
Sep 21, 2009 2:51:11 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: JDBC batch updates for versioned data: disabled
Sep 21, 2009 2:51:11 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Scrollable result sets: enabled
Sep 21, 2009 2:51:11 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: JDBC3 getGeneratedKeys(): enabled
Sep 21, 2009 2:51:11 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Connection release mode: auto
Sep 21, 2009 2:51:11 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Maximum outer join fetch depth: 2
Sep 21, 2009 2:51:11 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Default batch fetch size: 1
Sep 21, 2009 2:51:11 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Generate SQL with comments: disabled
Sep 21, 2009 2:51:11 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Order SQL updates by primary key: disabled
Sep 21, 2009 2:51:11 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Order SQL inserts for batching: disabled
Sep 21, 2009 2:51:11 PM org.hibernate.cfg.SettingsFactory createQueryTranslatorFactory
INFO: Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
Sep 21, 2009 2:51:11 PM org.hibernate.hql.ast.ASTQueryTranslatorFactory <init>
INFO: Using ASTQueryTranslatorFactory
Sep 21, 2009 2:51:11 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Query language substitutions: {}
Sep 21, 2009 2:51:11 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: JPA-QL strict compliance: disabled
Sep 21, 2009 2:51:11 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Second-level cache: enabled
Sep 21, 2009 2:51:11 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Query cache: disabled
Sep 21, 2009 2:51:11 PM org.hibernate.cfg.SettingsFactory createCacheProvider
INFO: Cache provider: org.hibernate.cache.HashtableCacheProvider
Sep 21, 2009 2:51:11 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Optimize cache for minimal puts: disabled
Sep 21, 2009 2:51:11 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Structured second-level cache entries: disabled
Sep 21, 2009 2:51:11 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Statistics: disabled
Sep 21, 2009 2:51:11 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Deleted entity synthetic identifier rollback: disabled
Sep 21, 2009 2:51:11 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Default entity-mode: pojo
Sep 21, 2009 2:51:11 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Named query checking : enabled
Sep 21, 2009 2:51:12 PM org.hibernate.impl.SessionFactoryImpl <init>
INFO: building session factory
Initial SessionFactory creation failed.java.lang.NoClassDefFoundError: net/sf/cglib/proxy/CallbackFilter
java.lang.NoClassDefFoundError: net/sf/cglib/proxy/CallbackFilter
at org.hibernate.bytecode.cglib.BytecodeProviderImpl.getProxyFactoryFactory(BytecodeProviderImpl.java:33)
at org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactoryInternal(PojoEntityTuplizer.java:182)
at org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:160)
at org.hibernate.tuple.entity.AbstractEntityTuplizer.<init>(AbstractEntityTuplizer.java:135)
at org.hibernate.tuple.entity.PojoEntityTuplizer.<init>(PojoEntityTuplizer.java:55)
at org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping.<init>(EntityEntityModeToTuplizerMapping.java:56)
at org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:295)
at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:434)
at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:109)
at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:226)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294)
at com.sample.SessionFactoryUtil.<clinit>(SessionFactoryUtil.java:18)
at com.sample.TestPerson.main(TestPerson.java:11)
Exception in thread "main" java.lang.NullPointerException
at com.sample.TestPerson.main(TestPerson.java:11)


Please help me to debug the program
Thanks in advance BUBI