Skip to main content
se añadieron 741 caracteres en el cuerpo
Origen Enlace
dddenis
  • 4k
  • 6
  • 28
  • 50

persistence.xml

<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.1" xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd">
  <persistence-unit name="AppJEE_rama_1-ejbPU" transaction-type="JTA">
    <jta-data-source>java:module/jdbc/librojee7rama__bd_telefonos</jta-data-source>
    <exclude-unlisted-classes>false</exclude-unlisted-classes>
    <properties>
      <property name="javax.persistence.schema-generation.database.action" value="create"/>
    </properties>
  </persistence-unit>
</persistence>

glassfish-resources.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE resources PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Resource Definitions//EN" "http://glassfish.org/dtds/glassfish-resources_1_5.dtd">
<resources>
    <jdbc-connection-pool allow-non-component-callers="false" associate-with-thread="false" connection-creation-retry-attempts="0" connection-creation-retry-interval-in-seconds="10" connection-leak-reclaim="false" connection-leak-timeout-in-seconds="0" 
                          connection-validation-method="auto-commit" datasource-classname="com.mysql.jdbc.jdbc2.optional.MysqlDataSource" 
                          fail-all-connections="false" idle-timeout-in-seconds="300" is-connection-validation-required="false" is-isolation-level-guaranteed="true" lazy-connection-association="false" lazy-connection-enlistment="false" match-connections="false" max-connection-usage-count="0" max-pool-size="32" max-wait-time-in-millis="60000" 
                          name="mysql_librojee7rama__bd_telefonos_rootPool" non-transactional-connections="false" pool-resize-quantity="2" 
                          res-type="javax.sql.DataSource" statement-timeout-in-seconds="-1" steady-pool-size="8" validate-atmost-once-period-in-seconds="0" wrap-jdbc-objects="false">
        <property name="serverName" value="localhost"/>
        <property name="portNumber" value="3306"/>
        <property name="databaseName" value="librojee7rama__bd_telefonos"/>
        <property name="User" value="root"/>
        <property name="Password" value="1234"/>
        <property name="URL" value="jdbc:mysql://localhost:3306/librojee7rama__bd_telefonos?zeroDateTimeBehavior=convertToNull"/>
        <property name="driverClass" value="com.mysql.jdbc.Driver"/>
    </jdbc-connection-pool>
    <jdbc-resource enabled="true" 
                   jndi-name="java:module/jdbc/librojee7rama__bd_telefonos" 
                   object-type="user" 
                   pool-name="mysql_librojee7rama__bd_telefonos_rootPool"/>
</resources>

persistence.xml

<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.1" xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd">
  <persistence-unit name="AppJEE_rama_1-ejbPU" transaction-type="JTA">
    <jta-data-source>java:module/jdbc/librojee7rama__bd_telefonos</jta-data-source>
    <exclude-unlisted-classes>false</exclude-unlisted-classes>
    <properties>
      <property name="javax.persistence.schema-generation.database.action" value="create"/>
    </properties>
  </persistence-unit>
</persistence>

glassfish-resources.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE resources PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Resource Definitions//EN" "http://glassfish.org/dtds/glassfish-resources_1_5.dtd">
<resources>
    <jdbc-connection-pool allow-non-component-callers="false" associate-with-thread="false" connection-creation-retry-attempts="0" connection-creation-retry-interval-in-seconds="10" connection-leak-reclaim="false" connection-leak-timeout-in-seconds="0" 
                          connection-validation-method="auto-commit" datasource-classname="com.mysql.jdbc.jdbc2.optional.MysqlDataSource" 
                          fail-all-connections="false" idle-timeout-in-seconds="300" is-connection-validation-required="false" is-isolation-level-guaranteed="true" lazy-connection-association="false" lazy-connection-enlistment="false" match-connections="false" max-connection-usage-count="0" max-pool-size="32" max-wait-time-in-millis="60000" 
                          name="mysql_librojee7rama__bd_telefonos_rootPool" non-transactional-connections="false" pool-resize-quantity="2" 
                          res-type="javax.sql.DataSource" statement-timeout-in-seconds="-1" steady-pool-size="8" validate-atmost-once-period-in-seconds="0" wrap-jdbc-objects="false">
        <property name="serverName" value="localhost"/>
        <property name="portNumber" value="3306"/>
        <property name="databaseName" value="librojee7rama__bd_telefonos"/>
        <property name="User" value="root"/>
        <property name="Password" value="1234"/>
        <property name="URL" value="jdbc:mysql://localhost:3306/librojee7rama__bd_telefonos?zeroDateTimeBehavior=convertToNull"/>
        <property name="driverClass" value="com.mysql.jdbc.Driver"/>
    </jdbc-connection-pool>
    <jdbc-resource enabled="true" 
                   jndi-name="java:module/jdbc/librojee7rama__bd_telefonos" 
                   object-type="user" 
                   pool-name="mysql_librojee7rama__bd_telefonos_rootPool"/>
</resources>
Añado estructura y más datos.
Origen Enlace
dddenis
  • 4k
  • 6
  • 28
  • 50

Cuando voy a realizar deploy (¿desplegar?)ejecutar sobre la APP me falla, pero si ejecuto (RUN) elejecutoel módulo war, funciona, eso sí, el envió del formulario al servlet falla y lanza error 500.


Estructura

Estructura del proyecto


Cuando voy a realizar deploy (¿desplegar?) sobre la APP me falla, pero si ejecuto (RUN) el módulo war, funciona, eso sí, el envió del formulario al servlet falla y lanza error 500.

Cuando voy a ejecutar sobre la APP me falla, pero si ejecutoel módulo war, funciona, eso sí, el envió del formulario al servlet falla y lanza error 500.


Estructura

Estructura del proyecto


etiquetas editadas
Enlace
user227
user227
Origen Enlace
dddenis
  • 4k
  • 6
  • 28
  • 50
Loading