[JBoss Seam] - Error Compiling generated entities from Postgre
by vcordaro12
I have followed the instructions to setup seam by using ./seam setup, inputing all the proper values to connect to my local postgres database. Then I run ./seam create-project and then ./seam generate-entities. All these seem to go through fine.
My entities get created and it seems to introspect the database with ease, however when I go to run ./seam restart it fails when it tries to compile the generated entities. I get messages about isEmpty in about 5 of my classes.
All seem to refer to the fact that you cannot have a isEmptry on something that is not a string.
If I remove these if statements all together then it complains about my database connection. Not sure what is going on here since it connected to the database fine when it generated my entities.
Do I need to setup a connection pool in JBoss or is that automatically done?
Thanks in advance..
Vince
restart:
[echo] Restarting project 'adlib_persistence_serivce_generator'
init:
[mkdir] Created dir: /Users/vctemp/Development/EchoStorm/workspace/adlib_persistence_serivce_generator/exploded-archives/adlib_persistence_serivce_generator.jar
[mkdir] Created dir: /Users/vctemp/Development/EchoStorm/workspace/adlib_persistence_serivce_generator/exploded-archives/adlib_persistence_serivce_generator.ear
[mkdir] Created dir: /Users/vctemp/Development/EchoStorm/workspace/adlib_persistence_serivce_generator/exploded-archives/adlib_persistence_serivce_generator.war
[mkdir] Created dir: /Users/vctemp/Development/EchoStorm/workspace/adlib_persistence_serivce_generator/dist
compile:
[javac] Compiling 108 source files to /Users/vctemp/Development/EchoStorm/workspace/adlib_persistence_serivce_generator/exploded-archives/adlib_persistence_serivce_generator.jar
[javac] /Users/vctemp/Development/EchoStorm/workspace/adlib_persistence_serivce_generator/src/action/com/echostorm/adlib/advis/persistence/beans/crud/AnnotationVwHome.java:26: isEmpty(java.lang.String) in org.jboss.seam.util.Strings cannot be applied to (java.lang.Integer)
[javac] if (Strings.isEmpty(getAnnotationVwId().getAnnotationId()))
[javac] ^
[javac] /Users/vctemp/Development/EchoStorm/workspace/adlib_persistence_serivce_generator/src/action/com/echostorm/adlib/advis/persistence/beans/crud/AnnotationVwHome.java:28: isEmpty(java.lang.String) in org.jboss.seam.util.Strings cannot be applied to (java.lang.Integer)
[javac] if (Strings.isEmpty(getAnnotationVwId().getCaptureId()))
[javac] ^
[javac] /Users/vctemp/Development/EchoStorm/workspace/adlib_persistence_serivce_generator/src/action/com/echostorm/adlib/advis/persistence/beans/crud/AnnotationVwHome.java:34: isEmpty(java.lang.String) in org.jboss.seam.util.Strings cannot be applied to (java.io.Serializable)
[javac] if (Strings.isEmpty(getAnnotationVwId().getAnnotationTextIndex()))
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4107794#4107794
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4107794
18 years, 5 months
[JBoss jBPM] - Programmatically starting a process
by mryilauer
I want to programmatically start a process. It seems pretty simple, just use the constructor with the process definition. I do it and it seems to work, but the process never shows up in the console.
I think the problem is that when I deploy from the JBoss IDE for eclipse, it says the deploy was successful, but it never shows up in the console. If I save the deploy using the other button, and then go to the console to deploy it, then it works fine.
I have gone over all the documentation I can find, I am using /jbpm-console/upload as my server deployer, the Test Connection works.
It seems like when I am running from inside the IDE, it doesn't seem to be pointed at the server. This is no doubt something simple I messed up in the setup, but everything else other than facelets works just fine.
What I want to do is start up a process with ProcessInstance instance = new ProcessInstance(processDefinition) and then flip over to the console to verify that the process did, indeed, get started up.
Any help would be greatly appreciated.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4107791#4107791
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4107791
18 years, 5 months
[Persistence, JBoss/CMP, Hibernate, Database] - Best Practices for using PersistentContexts in Seam Applicat
by karltraunmueller
Hello,
We have a regular Seam 1.2.1.GA Web Application under JBoss 4.0.5.GA with
- JSF (MyFaces 1.1.4) for the UI,
- (conversation and session-scoped) Seam Components for UI logic,
- EJB3 entity beans for persistence,
- and a POJO-based model for core product logic.
We've had some bugs related to persistence, mainly due to sloppy use of different kinds of PersistenceContexts scattered all over the place, and incorrectly scoped Seam Components (Conversation, Session).
The bugs we face are mainly of the form
- modify an entity in one Page (= View + associated conversation-scoped Seam Component using some PersistenceContext)
- go to another page (= another View + session-scoped Seam Component using another Persistence Context)
-> and the changes aren't reflected there (because of the mismatched component scoping).
So, my questions are now:
- What kind of PersistenceContext to use? There are three flavors: standard (EJB3), extended (EJB3), and Seam-managed. The standard contexts are applicable in situations where entities are accessed only within the scope of a single EJB method. The extended context is required in lazy-loading scenarios. What about the Seam-managed persistence context? Use it everywhere instead of standard and extended EJB?
- Are there any best practices of where to put the PersistenceContexts and how many to use? Put a single persistence context in some central DAO-Component? Or is it OK to inject it onto several Seam Components
- How about the above scenario (conversation-scoped Component's changes should be reflected in session-scoped Component's persistence context)?
regards,
Karl TraunmÃÂüller
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4107789#4107789
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4107789
18 years, 5 months
[JCA/JBoss] - Re: No suitable driver found for java:PostgresDS
by chewbacca
Hi Vicky (or anyone else who is willing to help),
After testing based on the resource you provided me, the problem is even more isolated now:
If I use the code below, IT WORKS:
<sql:setDataSource var="example" driver="org.postgresql.Driver" url="jdbc:postgresql://localhost:5432/jboss" user="jboss" password="jboss"/>
<sql:query var="qryPosts" dataSource="${example}">
SELECT postname, comments FROM public.posts
</sql:query>
When I use this code, IT DOESN'T WORK:
<sql:setDataSource var="example" dataSource="java:/PostgresDS"/>
<sql:query var="qryPosts" dataSource="${example}">
SELECT postname, comments FROM public.posts
</sql:query>
I believe the problem is the way I have configured the data source on JBoss. I probably have done something wrong, but I followinf the JBoss Getting Started guide besides other resources.
Any ideas?
Thanks again,
Andre
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4107787#4107787
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4107787
18 years, 5 months