Entity beans not registering with Ebean server

1,307 views
Skip to first unread message

Name256

unread,
Jan 24, 2011, 9:28:56 AM1/24/11
to Ebean ORM
Hello,

I have been worked with ebean on a few apps that mostly did data
migration and it seemed to work ok only that I have been running my
code from my IDE(Netbeans). I recently wrote a full program that is to
be deployed on a server on the internet but I can't seem to get it to
run once the code is packaged into a jar file. I'm surprised since it
is the same code that has been running on Netbeans only this time it
is packaged differently. Below is the output from the console log.

Kindly assist.
Abel

Jan 24, 2011 5:22:19 PM com.avaje.ebean.Ebean <clinit>
INFO: Ebean Version[2.6.1] Java Version[1.6.0_22]
Jan 24, 2011 5:22:19 PM
com.avaje.ebeaninternal.server.util.ClassPathSearch findClasses
WARNING: No Entities found in ClassPath using ClassPathReader
[com.avaje.ebeaninternal.server.util.DefaultClassPathReader@facf0b]
Classpath Searched[[file:/media/disk/NetBeansProjects/
MtamaduniTransactions/dist/MtamaduniTransactions.jar]]
Jan 24, 2011 5:22:19 PM
com.avaje.ebeaninternal.server.core.BootupClassPathSearch search
INFO: Classpath search hits in jars[] pkgs[] searchTime[7]
Jan 24, 2011 5:22:19 PM
com.avaje.ebeaninternal.server.lib.sql.DataSourcePool initialise
INFO: DataSourcePool [mysql] autoCommit[false]
transIsolation[READ_COMMITTED] min[1] max[25]
Jan 24, 2011 5:22:20 PM
com.avaje.ebeaninternal.server.core.DefaultServerFactory
setDatabasePlatform
INFO: DatabasePlatform name:mysql platform:mysql
Jan 24, 2011 5:22:20 PM
com.avaje.ebeaninternal.server.subclass.SubClassManager$1 run
INFO: SubClassFactory parent ClassLoader [sun.misc.Launcher
$AppClassLoader]
Jan 24, 2011 5:22:21 PM
com.avaje.ebeaninternal.server.deploy.DeployOrmXml findAllOrmXml
INFO: No deployment xml (orm.xml etc) was loaded.
Jan 24, 2011 5:22:21 PM
com.avaje.ebeaninternal.server.deploy.BeanDescriptorManager logStatus
INFO: Entities enhanced[0] subclassed[0]
Jan 24, 2011 5:22:21 PM
com.avaje.ebeaninternal.server.transaction.TransactionLogManager
<init>
INFO: Transaction logs in: logs
Jan 24, 2011 5:22:21 PM
com.avaje.ebeaninternal.server.autofetch.AutoFetchManagerFactory
deserializeAutoFetch
INFO: AutoFetch deserialized from file [/media/disk/NetBeansProjects/
MtamaduniTransactions/dist/./.ebean.mysql.autofetch]
Jan 24, 2011 5:22:21 PM
com.avaje.ebeaninternal.server.autofetch.DefaultAutoFetchManagerLogging
logToJavaLogger
INFO: AutoFetch queryTuning[true] profiling[true]
mode[DEFAULT_ONIFEMPTY] profiling rate[0.05] min[1] base[10]
Exception in thread "main" javax.persistence.PersistenceException:
mtamadunipaypal.models.paypal.SearchLog is NOT an Entity Bean
registered with this server?
at
com.avaje.ebeaninternal.server.core.DefaultServer.createQuery(DefaultServer.java:
963)
at
com.avaje.ebeaninternal.server.core.DefaultServer.createQuery(DefaultServer.java:
923)
at
com.avaje.ebeaninternal.server.core.DefaultServer.find(DefaultServer.java:
956)
at com.avaje.ebean.Ebean.find(Ebean.java:1142)
at
mtamadunipaypal.models.paypal.SearchLog.rememberProgress(SearchLog.java:
76)
at
mtamadunipaypal.controllers.paypal.Searches.saveSearches(Searches.java:
59)
at mtamadunipaypal.Main.main(Main.java:36)

edge

unread,
Jan 24, 2011, 9:35:42 AM1/24/11
to Ebean ORM
Ebean doesn't scan jar files by default so you need to tell Ebean to
scan your jar.

ebean.search.jars=myjar.jar,otherjar.jar

Name256

unread,
Jan 24, 2011, 9:40:07 AM1/24/11
to Ebean ORM
Perfect. Works like a charm.

Thankyou for the help.

Kind regards

b 石頭剪刀

unread,
Nov 6, 2017, 1:19:40 AM11/6/17
to Ebean ORM
ebean.search.jars where is it configured?

在 2011年1月24日星期一 UTC+8下午10:35:42,edge写道:

石頭剪刀b

unread,
Nov 6, 2017, 3:00:16 AM11/6/17
to eb...@googlegroups.com
I'm configuring it in yaml Don't work。
ebean:
search:
jars: my-core.jar

--

---
You received this message because you are subscribed to a topic in the Google Groups "Ebean ORM" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ebean/QlTFJGPFZbY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ebean+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Rob Bygrave

unread,
Nov 6, 2017, 4:57:20 AM11/6/17
to ebean@googlegroups
What version of Ebean are you using?

In current Ebean versions we are expecting a jar to contain a ebean.mf manifest file that specifies the entity-packages.

For example:
https://github.com/ebean-orm-examples/example-java8/blob/master/src/main/resources/ebean.mf


So if the jars that contain entity beans each have a ebean.mf ... these are combined to define all the packages containing entity beans.


--

---
You received this message because you are subscribed to the Google Groups "Ebean ORM" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ebean+unsubscribe@googlegroups.com.

石頭剪刀b

unread,
Nov 6, 2017, 5:44:42 AM11/6/17
to eb...@googlegroups.com
The version I used is 10.3.1。
My enhanced entity is defined in project A。
Project A is packaged into a public jar named A.jar.
ebean.mf are defined in project A.
ebean.mf : 
entity-packages: net.caidingke.shepherd.domain
transactional-packages: net.caidingke.shepherd
querybean-packages: net.caidingke.shepherd

A.jar is placed in classpath of B
when I start project B,it  throws net.caidingke.shepherd.domain.AdminUser is NOT an Entity Bean registered with this server?


石頭剪刀b

unread,
Nov 7, 2017, 2:02:25 AM11/7/17
to eb...@googlegroups.com
I need your help
Because I really really like Ebean.
I want to use it production enviroment.

石頭剪刀b

unread,
Nov 7, 2017, 3:43:18 AM11/7/17
to eb...@googlegroups.com
This is a my example: https://github.com/challengeof/spring-boot-ebean-example
Repeat steps:
2、cd dir
3、mvn clean install
4、cd admin
5、mvn spring-boot:run
6、execute db-create-all.sql
7、browser access :localhost:8093/api/name?username=test
8、console output : net.caidingke.domain.User is NOT an Entity Bean registered with this server?
Reply all
Reply to author
Forward
0 new messages