-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: strange problem deploying APPLET on tomcat
PostPosted: Sun Oct 09, 2005 11:39 pm 
Newbie

Joined: Sun Oct 09, 2005 11:34 pm
Posts: 6
im a developing an application that is based on an applet that gets the data of a postgresql DB using hibernate, everything is ok when i see it by eclipse, but im gettin some problems when deployiong it on tomcat 5.5.9
i already include jars that the applet needs, the problem seems that i have to grant permission to the applet to connect and get info of the db, i test by modifying my java.policy and it works well the web page, but obviusly this only wokrs locally (it would work on other clients only if the clients modifies its own java.policy) so thats not a razonable solution.
the other solution i read was to make it a signed applet, i did it but still the same error...

Hibernate version: 3.0.5

Full stack trace of any exception that occurs:
[INFO] Environment - Hibernate 3.0.5
[INFO] Environment - hibernate.properties not found
[WARN] Environment - could not copy system properties, system properties will be ignored
[INFO] Environment - using CGLIB reflection optimizer
[INFO] Environment - using JDK 1.4 java.sql.Timestamp handling
[INFO] Configuration - configuring from resource: /bd/hibernate/hibernate.cfg.xml
[INFO] Configuration - Configuration resource: /bd/hibernate/hibernate.cfg.xml
[INFO] Configuration - Mapping resource: bd/hibernate/mapping/Alerta.hbm.xml
[INFO] HbmBinder - Mapping class: bd.hibernate.mapping.Alerta -> alerta
[INFO] Configuration - Mapping resource: bd/hibernate/mapping/Biblioteca.hbm.xml
[INFO] HbmBinder - Mapping class: bd.hibernate.mapping.Biblioteca -> biblioteca
[INFO] Configuration - Mapping resource: bd/hibernate/mapping/Medicion.hbm.xml
[INFO] HbmBinder - Mapping class: bd.hibernate.mapping.Medicion -> medicion
[INFO] Configuration - Mapping resource: bd/hibernate/mapping/Mensajefinal.hbm.xml
[INFO] HbmBinder - Mapping class: bd.hibernate.mapping.Mensajefinal -> mensajefinal
[INFO] Configuration - Mapping resource: bd/hibernate/mapping/Mensajetiempo.hbm.xml
[INFO] HbmBinder - Mapping class: bd.hibernate.mapping.Mensajetiempo -> mensajetiempo
[INFO] Configuration - Mapping resource: bd/hibernate/mapping/Perfil.hbm.xml
[INFO] HbmBinder - Mapping class: bd.hibernate.mapping.Perfil -> perfil
[INFO] Configuration - Mapping resource: bd/hibernate/mapping/Letrero.hbm.xml
[INFO] HbmBinder - Mapping class: bd.hibernate.mapping.Letrero -> letrero
[INFO] Configuration - Mapping resource: bd/hibernate/mapping/Recorrido.hbm.xml
[INFO] HbmBinder - Mapping class: bd.hibernate.mapping.Recorrido -> recorrido
[INFO] Configuration - Mapping resource: bd/hibernate/mapping/Usuario.hbm.xml
[INFO] HbmBinder - Mapping class: bd.hibernate.mapping.Usuario -> usuario
[INFO] Configuration - Mapping resource: bd/hibernate/mapping/Permiso.hbm.xml
[INFO] HbmBinder - Mapping class: bd.hibernate.mapping.Permiso -> permiso
[INFO] Configuration - Mapping resource: bd/hibernate/mapping/Valorpermiso.hbm.xml
[INFO] HbmBinder - Mapping class: bd.hibernate.mapping.Valorpermiso -> valorpermiso
[INFO] Configuration - Mapping resource: bd/hibernate/mapping/Caracteres.hbm.xml
[INFO] HbmBinder - Mapping class: bd.hibernate.mapping.Caracteres -> caracteres
[INFO] Configuration - Mapping resource: bd/hibernate/mapping/Tipoletrero.hbm.xml
[INFO] HbmBinder - Mapping class: bd.hibernate.mapping.Tipoletrero -> tipoletrero
[INFO] Configuration - Mapping resource: bd/hibernate/mapping/Categoriamsgbiblioteca.hbm.xml
[INFO] HbmBinder - Mapping class: bd.hibernate.mapping.Categoriamsgbiblioteca -> categoriamsgbiblioteca
[INFO] Configuration - Mapping resource: bd/hibernate/mapping/Categoriapermiso.hbm.xml
[INFO] HbmBinder - Mapping class: bd.hibernate.mapping.Categoriapermiso -> categoriapermiso
[INFO] Configuration - Configured SessionFactory: null
[INFO] Configuration - processing extends queue
[INFO] Configuration - processing collection mappings
[INFO] HbmBinder - Mapping collection: bd.hibernate.mapping.Biblioteca.mensajefinalSet -> mensajefinal
[INFO] HbmBinder - Mapping collection: bd.hibernate.mapping.Mensajetiempo.medicionSet -> medicion
[INFO] HbmBinder - Mapping collection: bd.hibernate.mapping.Mensajetiempo.mensajefinalSet -> mensajefinal
[INFO] HbmBinder - Mapping collection: bd.hibernate.mapping.Perfil.usuarioSet -> usuario
[INFO] HbmBinder - Mapping collection: bd.hibernate.mapping.Perfil.valorpermisoSet -> valorpermiso
[INFO] HbmBinder - Mapping collection: bd.hibernate.mapping.Letrero.bibliotecaSet -> biblioteca
[INFO] HbmBinder - Mapping collection: bd.hibernate.mapping.Letrero.recorridoSet -> recorrido
[INFO] HbmBinder - Mapping collection: bd.hibernate.mapping.Recorrido.medicionSet -> medicion
[INFO] HbmBinder - Mapping collection: bd.hibernate.mapping.Usuario.alertaSet -> alerta
[INFO] HbmBinder - Mapping collection: bd.hibernate.mapping.Usuario.mensajetiempoSet -> mensajetiempo
[INFO] HbmBinder - Mapping collection: bd.hibernate.mapping.Usuario.mensajetiempo1Set -> mensajetiempo
[INFO] HbmBinder - Mapping collection: bd.hibernate.mapping.Permiso.valorpermisoSet -> valorpermiso
[INFO] HbmBinder - Mapping collection: bd.hibernate.mapping.Tipoletrero.caracteresSet -> caracteres
[INFO] HbmBinder - Mapping collection: bd.hibernate.mapping.Tipoletrero.letreroSet -> letrero
[INFO] HbmBinder - Mapping collection: bd.hibernate.mapping.Categoriamsgbiblioteca.bibliotecaSet -> biblioteca
[INFO] HbmBinder - Mapping collection: bd.hibernate.mapping.Categoriapermiso.permisoSet -> permiso
[INFO] Configuration - processing association property references
[INFO] Configuration - processing foreign key constraints
[INFO] DriverManagerConnectionProvider - Using Hibernate built-in connection pool (not for production use!)
[INFO] DriverManagerConnectionProvider - Hibernate connection pool size: 20
[INFO] DriverManagerConnectionProvider - autocommit mode: false
[INFO] DriverManagerConnectionProvider - using driver: org.postgresql.Driver at URL: jdbc:postgresql://192.168.1.2/Inforuta
[INFO] DriverManagerConnectionProvider - connection properties: {user=inforuta, password=****}
[WARN] SettingsFactory - Could not obtain connection metadata <org.postgresql.util.PSQLException: Algo inusual ha ocurrido que provocó un fallo en el controlador. Por favor reporte esta excepción.>org.postgresql.util.PSQLException: Algo inusual ha ocurrido que provocó un fallo en el controlador. Por favor reporte esta excepción.
at org.postgresql.Driver.connect(Driver.java:249)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:110)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:72)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1463)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1004)
at bd.hibernate.HibernateUtil.currentSession(HibernateUtil.java:52)
at bd.controlador.CLetrero.ListarLetreros(CLetrero.java:48)
at Interfaz.InterfazOp.DesplegarLetreros(InterfazOp.java:896)
at Interfaz.InterfazOp.<init>(InterfazOp.java:120)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.security.AccessControlException: access denied (java.net.SocketPermission 192.168.1.2:5432 connect,resolve)
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkConnect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at org.postgresql.core.PGStream.<init>(PGStream.java:58)
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:77)
at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:65)
at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:117)
at org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30)
at org.postgresql.jdbc3.Jdbc3Connection.<init>(Jdbc3Connection.java:24)
at org.postgresql.Driver.connect(Driver.java:235)
... 21 more

[INFO] Dialect - Using dialect: org.hibernate.dialect.PostgreSQLDialect
[INFO] TransactionFactoryFactory - Using default transaction strategy (direct JDBC transactions)
[INFO] TransactionManagerLookupFactory - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
[INFO] SettingsFactory - Automatic flush during beforeCompletion(): disabled
[INFO] SettingsFactory - Automatic session close at end of transaction: disabled
[INFO] SettingsFactory - Scrollable result sets: disabled
[INFO] SettingsFactory - JDBC3 getGeneratedKeys(): disabled
[INFO] SettingsFactory - Connection release mode: null
[INFO] SettingsFactory - Default batch fetch size: 1
[INFO] SettingsFactory - Generate SQL with comments: disabled
[INFO] SettingsFactory - Order SQL updates by primary key: disabled
[INFO] SettingsFactory - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
[INFO] ASTQueryTranslatorFactory - Using ASTQueryTranslatorFactory
[INFO] SettingsFactory - Query language substitutions: {}
[INFO] SettingsFactory - Second-level cache: enabled
[INFO] SettingsFactory - Query cache: disabled
[INFO] SettingsFactory - Cache provider: org.hibernate.cache.EhCacheProvider
[INFO] SettingsFactory - Optimize cache for minimal puts: disabled
[INFO] SettingsFactory - Structured second-level cache entries: disabled
[INFO] SettingsFactory - Echoing all SQL to stdout
[INFO] SettingsFactory - Statistics: disabled
[INFO] SettingsFactory - Deleted entity synthetic identifier rollback: disabled
[INFO] SettingsFactory - Default entity-mode: pojo
java.lang.NoClassDefFoundError
at net.sf.cglib.core.DefaultGeneratorStrategy.getClassWriter(DefaultGeneratorStrategy.java:30)
at net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:24)
at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:215)
at net.sf.cglib.core.KeyFactory$Generator.create(KeyFactory.java:145)
at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:117)
at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:108)
at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:104)
at org.hibernate.impl.SessionFactoryImpl.<clinit>(SessionFactoryImpl.java:321)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1005)
at bd.hibernate.HibernateUtil.currentSession(HibernateUtil.java:52)
at bd.controlador.CLetrero.ListarLetreros(CLetrero.java:48)
at Interfaz.InterfazOp.DesplegarLetreros(InterfazOp.java:896)
at Interfaz.InterfazOp.<init>(InterfazOp.java:120)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)


Name and version of the database you are using: postgresql 8.0

Thanks for any help.
Tomas Barrios.


Top
 Profile  
 
 Post subject: Re: strange problem deploying APPLET on tomcat
PostPosted: Mon Oct 10, 2005 12:12 am 
Expert
Expert

Joined: Mon Jul 04, 2005 5:19 pm
Posts: 720
tomasbarrios wrote:
i already include jars that the applet needs


tomasbarrios wrote:
java.lang.NoClassDefFoundError
at net.sf.cglib.core.DefaultGeneratorStrategy.getClassWriter(DefaultGeneratorStrategy.java:30)
at net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:24)
at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:215)
at net.sf.cglib.core.KeyFactory$Generator.create(KeyFactory.java:145)
at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:117)
at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:108)
at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:104)
at org.hibernate.impl.SessionFactoryImpl.<clinit>(SessionFactoryImpl.java:321)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1005)
at bd.hibernate.HibernateUtil.currentSession(HibernateUtil.java:52)
at bd.controlador.CLetrero.ListarLetreros(CLetrero.java:48)
at Interfaz.InterfazOp.DesplegarLetreros(InterfazOp.java:896)
at Interfaz.InterfazOp.<init>(InterfazOp.java:120)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)


Top
 Profile  
 
 Post subject: psible change
PostPosted: Mon Oct 10, 2005 6:53 pm 
Newbie

Joined: Sun Oct 09, 2005 11:34 pm
Posts: 6
im thiniking to change to an applet-servlet structure to solve this... i suggest nobody trying to connect an applet directly to a DB.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.