my application works fine on my local installation in Netbeans 11 (the Database (MariaDB) is running on an external ubuntuserver). When I deploy the application on my ubuntuserver (glassfishserver) the LoginPage becomes visible, but when I want to login (so when entities are needet and I need a connection to the database) I get this errormessage:
/index.xhtml @29,141 value="#{userLoggedin.username}": Target Unreachable, identifier 'userLoggedin' resolved to null
The database can be reached from the ubuntuserver where I deploy my application (there is a pretty small Java app running on the glassfishserver with "prepared statements" -> and this works fine with the database).
The application is written in Java - JSF.
beans.xml:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/beans_2_0.xsd"
bean-discovery-mode="all">
</beans>
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_lucy_db_prod_agd_externPool" 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="here is the IP"/>
<property name="portNumber" value="3306"/>
<property name="databaseName" value="lucy_db_prod"/>
<property name="User" value="here is a user"/>
<property name="Password" value="here is the pw"/>
<property name="URL" value="jdbc:mysql://here is the ip:3306/lucy_db_prod?zeroDateTimeBehavior=convertToNull"/>
<property name="driverClass" value="com.mysql.cj.jdbc.MysqlDataSource"/>
</jdbc-connection-pool>
<jdbc-resource enabled="true" jndi-name="java:app/lucy_extern" object-type="user" pool-name="mysql_lucy_db_prod_agd_externPool"/>
</resources>
So once more: the software works really fine on my local computer but not when I try to login on the deloyed one. I hope someone can help me ...