java - Web app with JPA doesn't work on extenal Tomcat server -


i've problems publishing dynamic web application in tomcat, on vps server.

i developed application contains servlet( creating entity manager , doing operations on database), , jar files - entity components packed in jar file. application uses eclipselink , postgresql.

on tomcat 7 server installed witch eclipse, works fine, when try deploy tomcat 7 server on vps i'm getting exception:

javax.servlet.servletexception: error instantiating servlet class pl.marekbury.controller.storeserver 

and root cause

javax.naming.namenotfoundexception: name [pl.marekbury.controller.storeserver/persistence_unit_name] not bound in context. unable find [pl.marekbury.controller.storeserver]. 

i had same error on localhost eclipse-integrated server, found solution (somwere here, on stack) chcange eclipselink version, after did id, error's gone.

i'm deploying app in these way: - export war eclispe - deploy trough tomcat web manager

i tried: - change server tomee - place jar libs in web-inf/lib

structure of application folder after deploying tomcat:

 ----krzyzyk       |   |---index.jsp       |---meta-inf       |          |---manifest.mf       |       |---web-inf       |          |---web.xml       |          |---lib       |          |      |---all jar files(entities,servlet-api itd..)       |          |       |          |---classes       |          |      |---meta-inf(remain after making jar entities)       |          |      |---pl       |          |      |     |---marekbury       |          |      |     |        |---controller       |          |      |     |        |       |---storeserver.class       |          |      |     |        |---model       |          |      |     |        |       |---entities       |          |      |     |        |       |       |---user.class (remain after making jar entities) 

index.jsp makes http request servlet storeserver

any ideas how make run properly?

i have found solution. error caused different java versions on vps(oracle 1.7) , computer(openjdk 1.7). have made .war on vps , works fine.


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -