jpa - GlassFish can't find my datasource -


i created java ee web application in netbeans connected derby db.

i generated entity bean via "create entity database" did. there menu had fill in datasource called "wwhy source". after generated session beans entity user.

the problem each time try deploy application gives me exception.

initially during deployment.

in-place deployment @ c:\users\nam\documents\programming\netbeansprojects\wwhy\build\web glassfish server 4.1, deploy, null, false c:\users\nam\documents\programming\netbeansprojects\wwhy\nbproject\build-impl.xml:1045: module has not been deployed. 

in glassfish log

exception while preparing app : invalid resource : wwhy source__pm 

honestly don't have single clue why doesn't work.
can give rest of glassfish log output kinda same. tried clean , build, restarting netbeans nothing helps. stopped working tried use jpa.

please me :)


edit
when created entity bean via "entity class databases", automatically create persistence.xml . called new datasource "wwhy source":

<persistence-unit name="wwhypu" transaction-type="jta"> <jta-data-source>wwhy source</jta-data-source> <exclude-unlisted-classes>false</exclude-unlisted-classes> <properties/> 

but deploy somehow doesn't work because glassfish searches "wwhy source_pm"

when jdbc resources via glassfish console there no jdbc resource name "wwhy source".
here glassfish-resources.xml

<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="org.apache.derby.jdbc.clientdatasource" 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="derby_net_wwhy-db_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="1527"/>     <property name="databasename" value="wwhy-db"/>     <property name="user" value="root"/>     <property name="password" value="root"/>     <property name="url" value="jdbc:derby://localhost:1527/wwhy-db"/>     <property name="driverclass" value="org.apache.derby.jdbc.clientdriver"/> </jdbc-connection-pool> <jdbc-resource enabled="true" jndi-name="wwhy source" object-type="user" pool-name="derby_net_wwhy-db_rootpool"/> 

i hope can me. !

you can try create datasource directly in glassfish server , update name of newly created data-source in persistence.xml. recommend create data-source name without "space" (glassfish can go crazy empty spaces).


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -