I have a session been that takes an SQL select query string (not EJBQL), runs
the query and returns the resultset. This worked fine in 4.0.5. In 5.1.0 the
resultset is open inside the session bean method but when trying to access the
result set (rs.next()) in the method that called the
This is crazy. We moved the code outside of the session bean and all works
just fine.
Is there a rule that says:
If you create a ResultSet inside a session bean that you cannot return to a
non-session bean caller?
If someone answers this question 'yes' then: How is it that I have been doing
A work-around addressed my needs.
I save the value of interest in @PostLoad and use it in @PreUpdate.
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=4199791#4199791
Reply to the post :
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4199791
When I try to use named pipes with MySQL launched via mysqld-service.xml I get:
.
Caused by: java.io.FileNotFoundException: \\.\pipe\MySQL (The system cannot
find the file specified)
at java.io.RandomAccessFile.open(Native Method)
at
I see these in the log.
2008-11-05 14:35:35,457 WARN [org.jboss.tm.TransactionImpl] Transaction
TransactionImpl:XidImpl[FormatId=257, GlobalId=ch2wpiwhse/2352, BranchQual=,
localId=2352] timed out. status=STATUS_ACTIVE
Using MSSQL 2005
jTds driver 1.2.2
JBoss AS 4.0.5 w/EJB3
How can I change
I can start MySQL outside of JBoss with named pipes enabled and then configure
a datasource to connect to it. If I launch MySQL via jmx (mysqld-service.xml)
I see it running but when the datasource using it tries to connect it cannot.
I see this in the log:
Caused by:
some of the xml was chopped out of my post: (re-did without )
mbean code=com.mysql.management.jmx.jboss.JBossMysqldDynamicMBean
name=mysql:type=service,name=mysqld
attribute name=datadir..\server\default\data\mysql\data /attribute
attribute name=basedir..\server\default\data\mysql
Adding this to the datasource .xml file fixed the problem:
transaction-isolation
TRANSACTION_READ_UNCOMMITTED
transaction-isolation
(XML tags removed)
This is okay for my app. Not for all apps.
View the original post :
I am closing this since it is somewhat miss-labeled now that I know more about
it.
Search for SLSB and MSSQL and Entity to find new post.
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=4181898#4181898
Reply to the post :
JBoss AS 4.0.5.GA
Hibernate Core 3.3.1.GA
Hibernate EntityManager 3.4.0.GA
MSSQL Server 2000 and 2005 (same symptom)
Seam 1.2.1.GA
The app runs fine with MySQL. If I have an entity bean method annotated with
@PostPersist, @PostUpdate or @PostRemove and that method calls an SLSB the
method
I have determined that the problem is more general than I have stated.
Simply put: there is an SQL Server request that is not completing and it is
blocking any requests to the same table made after it. I see a page level lock.
I can see a statement that is blocking/sleeping and then the one
I am testing an existing app with MSSQL Server. It has been up and running
fine with MySQL.
JBoss AS 4.0.5.GA
Hibernate Core 3.3.1.GA
Hibernate EntityManager 3.4.0.GA
MSSQL Server 2000 and 2005 (same symptom)
Seam 1.2.1.GA
On an entityManager.persist() call for one particular table the call
I should add: The app reads the problematic table with no problems.
I have discovered the problem is with a method anotated with @PostPersist and
@PostUpdate. If I remove these annotations the problem goes away!
Again: this works fine in with MySQL
View the original post :
I missed a section in the wiki that explained how to configure a schedule
WITHIN an app.
Key point: scheduler-service.xml file is in /META-INF
See last section in wiki: http://wiki.jboss.org/wiki/Scheduler
View the original post :
I missed a section in the wiki that explained how to configure a schedule
WITHIN an app.
Key point: scheduler-service.xml file is in /META-INF
See last section in wiki: http://wiki.jboss.org/wiki/Scheduler
View the original post :
Already in beginners forum. Really a config question.
http://www.jboss.com/index.html?module=bbop=viewtopict=142506
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=4177534#4177534
Reply to the post :
I have seen this before and created a work-around. I have since changed my
deployment layout (due to EJB3/Seam) and now my work-around does not work.
in schedule-service.xml:
true
com.shockwatch.swevents.rdp.extract.RDPAutoExtract
09/16/2008 6:38
12
-1
The
Forgot to give version:
JBoss AS 4.0.5GA
and error:
--- MBeans waiting for other MBeans ---
ObjectName: RDPExtract:service=Scheduler
State: FAILED
Reason: org.jboss.deployment.DeploymentException: Exception setting attribute
[EMAIL PROTECTED] on mbean RDPExtract:service=Scheduler; - nested
jaikiran, Thanks for your help on this. I was also convinced it is an
ordering issue. The key point here is that @Startup and a servlet configured
with load-on-startup appears to load the class and execute the startup method
before the jndi binding has completed.
To clarify: when using
I have included excerpts from the log and JNDIView. I am still stuck on this
problem.
I notice that:
1) The added bean message for DBUtilBean is 1st (with expected jndi name)
2) The Seam welcome message is next
3) The failed lookup is next (this is now in a servlet)
4) then I see: STARTED
I have bean doing jndi session bean lookups for quite a while. All were
pre-JBoss 5.
Using JNDIView I can clearly see the path I am using in the lookup is exactly
what I expect it to be and is in the Global Namespace. I get the well known
and dreaded javax.naming.NameNotFoundException: ec20
Version is: JBoss 5.0.0.CR1
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=4165040#4165040
Reply to the post :
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4165040
___
jboss-user mailing list
Thanks for the reply. When I read it I thought this may be the answer. But,
it was not. I have since realized this additional info is relevant:
It is an ear deployment that contains my jar and war file (now listed in that
order in application.xml)
The war file contains no classes, all are
One more thing: The attempted SLSB lookup that is failing is in the
@PostContruct method of the Seam class that is an @Startup class.
But, all indications are the SLSB it is trying to lookup is already loaded and
should be found with the jndi name I am using.
View the original post :
I need to find a write up on the rules for entity lazy loading. My knowledge
has been gathered by experimentation and examples. I have this scenario that
I do not understand.
In an SLSB I load an entity using entityManager.find()
I pass that entity to a method in another class (which passes
I have a stateless bean method that calls
em.createNativeQuery(sql).executeUpdate();
I call it from another method in the same SLSB in a loop. If, for example the
first call fails, then all subsequent calls fail with this error:
javax.persistence.TransactionRequiredException:
Thanks for the input. I have never heard that you must use the proxy in this
scenario. I have seen this statement (from JBoss trailbalzer):
In EJB 3.0 applications, transaction properties are most frequently declared
for methods in session beans. If a method requires transaction, all
I need to know the before and after values when an update occurs. I can
clearly see using the debugger that when the preupdate annotated method is
called the value of interest already has the new value/changed!
My intent was to save the old value in the @PreUpdate method and then use it
Scenario/Versions:
JBoss AS 4.0.5
Seam 1.2.1
MySql 5.1
Seam Injected entitymanager
I need to add a new row and read back the auto-assigned primary key. I can tell
the record is not really commited to the DB even after flush is called. It
looks like it is being committed when the method exits.
Thanks.
This is resolved. The problem was Hibernate could not find the whole database
not just a table. A rename of the DB resolved the problem.
I am not 100% sure but I think the following explains it: It was because the
catalog= in the @Table annotation in the EJB3 classes did not
but the principalrole table it is certainly in the database. I can query it
just fine. I have this app running on 5 other servers, both Windows and Unix,
with no problems. Suddenly on this server I get a Hibernate exception at
startup.
Environment:
JBoss AS 4.0.5.GA
Hibernate EntityManager
Help!
please see:
http://www.jboss.com/index.html?module=bbop=viewtopicp=4144655#4144655
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=4144658#4144658
Reply to the post :
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4144658
I had to hack to Hibernate core to make this work. I changed the line that
throws the exception to just issue a warning and I can now read rows
successfully. The proper class is returned based on the discriminator column
value as expected.
This must be a bug as I definitely do no have
Environment: Inside one JVM (JBoss AS 4.0.5 w/EJB3)
If a managed entity instance is held by thread A and thread B makes and saves
changes to another managed instance will those changes be visible the next time
thread A accesses its copy?
If answer is 'no' one might ask why not do a merge in
I have a simple test case I created to experiment with this behaving as
expected. When I determine why the offending code is behaving this way I will
post it with an explanation.
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=4123035#4123035
Reply to the post
I have a simple test case I created to experiment with behaving as expected.
When I determine why the offending code is behaving this way I will post it
with an explanation.
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=4123036#4123036
Reply to the post :
Environment: JBoss AS 4.0.5, Hibernate 3.2.5, Hibernate EM 3.3.1
I am using CMP. I have an injected entitymanager (em) in an SLSB I use to
persist new rows into the DB.
After an exception is thrown (in this case a dup key) - subsequent calls to
the SLSB method that does the persist seems to
SLSB injected EntityManager is not usable after a persistence exception.
Shouldn't a new em be injected on next method call?
see: http://www.jboss.com/index.html?module=bbop=viewtopict=128335
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=4122731#4122731
Hopefully it is useful to you!
This would be used when an exception is thrown in a method that saves an entity
bean, the Hibernate validator is being used, and you are using the Seam
FacesMessages object. It tries to find the Hibernate InvalidStateException
object, which may be wrapped in the
Thanks itsme
I am using 4.0.5.GA, Hibernate 3.2.5 (per manifest file).
Can you elaborate on your configuration? Look at my post:
http://www.jboss.com/index.html?module=bbop=viewtopict=127223
I cannot get past those problems.
If I use insertable=false and updatable=false as the error message
As I suspected this did not work. How would the container know the coulmn and
the type to apply the discriminator value to if you omit the
@DiscriminatorColumn?
It seems to be complaining about a property named connected. My entity has
no such property?
I see many examples like what I am
Correction: Hibernate 3.2.3.GA. I looked at wrong JBoss instance
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=4120910#4120910
Reply to the post :
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4120910
Here is a JBoss example:
http://labs.jboss.com/jbossejb3/docs/tutorial/singleinheritance/single.html
The only difference between this example and mine is my discriminator column is
INTEGER. If I use the approach and annotations from example I get:
javax.persistence.PersistenceException:
This is identical to my approach. I am using INTEGER type also.
What version of JBoss and Hibernate are you using? You can look into the
Hibernate manifest.MF file under the META_INF folder in the jar if you are
unsure
I have versions:
hibernate-entitymanager.jar 3.2.0.GA
I installed JBoss AS 4.2.2 which contained the Hibernate version itsme listed.
Still the same problem!
Repeated column in mapping for entity: com.shockwatch.dbfacade.SWUnit column:
hwModel (should be mapped with insert=false update=false)
I have other issues with a move to 4.2.2 since I am
I have not gotten back to this since another project has taken priority. I
will try it in the next day or so.
Does he mean don't use the discriminator column on the subclasses? Surely you
have to have it on the base class to tell the container how to detect the
proper class to return.
I need to ensure that multiple client requests execute in parallel. This is
due the the nature of processing may have blocking of many seconds. The
requests arrive via socket data from remote devices (not a web app request). I
see and understand how JMS can be a solution and I see this
Felix,
So how is the EJB subsystem going to know which class to return if I don't use
a discriminator column?
I tried removing the discriminator as you suggested, knowing it would not work,
and as I thought it did not work. I get the error below with no discriminator
column in any of the
Please see:
http://www.jboss.com/index.html?module=bbop=viewtopict=127223
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=4119253#4119253
Reply to the post :
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4119253
Please see:
http://www.jboss.com/index.html?module=bbop=viewtopict=127223
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=4118824#4118824
Reply to the post :
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4118824
Can anyone confirm they have seen this work? I just followed examples but
cannot get it to work.
If you have it working please specify which versions of JBoss and Hibernate
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=4118439#4118439
Reply to the post :
JBoss 4.0.5.GA w/EJB3 and Hibernate 3.2.3.ga (I think this is Hibernate version
)
I am trying to use entity inheritance. I have followed JBoss examples.
If I don't put updatable=false, insertable=false on the discriminator column I
get this error at deployment time:
19:04:43,113 WARN
Title was chopped:
ended with:
w/SINGLE_TABLE inheritance
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=4118123#4118123
Reply to the post :
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4118123
___
Thanks a bunch Mazz. Very helpful
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=4116734#4116734
Reply to the post :
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4116734
___
jboss-user mailing list
JBoss 4.0.5.GA, whatever version of Hibernate came with it
In persistence.xml:
I print out the property value in my app and it shows to be true. I never see
any logging for hibernate of any kind. I even changed log4j.xml to have
org.hibernate priority=DEBUG. I have had this working in
A line of text seems to have dropped out of my post.
In persistence.xml: I have
property name=hibernate.show_sql value=true
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=4116581#4116581
Reply to the post :
JBoss AS 4.0.5.GA, MySQL, nothing unusual about config, Windows XP
Examples I have seen suggest that if you modify or create CMP entitybeans
inside a session bean method then at the exit of that method these changes will
be saved to the DB (flushed without calling em.merge or em.persist). I
Thanks Mazz.
I am aware of the transaction layering effect (for lack of a better term) that
applies if one session beans calls another. I am certain all of my session
bean methods are exiting.
The code is simple and basic. In this particular method I create one entity
and modify another.
I decided to post the code. I just saw your comment about the new entity ...
and that does explain part of it (purchase not saved ) as you will see. That
does not explain why the changed entity (member) did not get saved. Member was
injected in the calling SLSB using SEAM and passed to this
Env: JBoss AS 4.0.5.GA w/EJB3
I have looked over several different docs that describe how to use entity
inheritance w/ SINGLE_TABLE. I used those examples as the basis for my code.
I have a base class Units and have subclasses RFUnit and EMUnit.
(em is an entitymanager object)
When I do
Goal: ability to retrieve the foreign key without loading the related
object/table row.
Scenario:
Entity bean contains a related entity bean.
@Entity
class Unit{ // Unit table
// what kind of unit
Model model; // related object in Model table, related column is modelId
In the Unit table
It Seams to me there are two obvious ways to do a very common task.
For a Seam + EJB 3.0 based application.
Scenario: Need to maintain state between requests.
Solution 1: use statefull session beans and store into instance variables
Solution 2: use stateless session beans and use @In and
I should have added: For my application there is a single server. Local
session bean access not remote. The answer may differ for remote.
Comments on remote access and clustering are solicited as well but my primary
interest is within a single JVM.
View the original post :
Thanks all. I got this working.
Remember: The value= attribute on the dataTable should be the name used for
the @Factory annotation. In the example below 'theList'
In session bean:
@Factory(theList)
public void loadList() { some code to load it }
In the page:
h:dataTable id=testList
Heads Up:
s:button - always plays first item from list (must be a bug)
h:commandButton - plays selected/clicked item (works properly)
where s is Seam taglib
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=4073669#4073669
Reply to the post :
My mistake. I had the wrong thread/topic pulled up when I did the post!
Ignore last entry. Admins: please delete my last entry if you can.
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=4073671#4073671
Reply to the post :
Heads Up:
s:button - always plays first item from list (must be a bug)
h:commandButton - plays selected/clicked item (works properly)
where s is Seam taglib
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=4073673#4073673
Reply to the post :
Thanks for the help. I will look at a possible solution with @DataModel and
@DataModelSelection.
FYI: Example 1.11 in Seam reference 1.2.1.GA is relevant to @DataModel
My apologies. I am new to Seam and misunderstood what you meant by data model.
I thought you guys were referring to my
Thanks but my issue has nothing to do with the data model. I am entity beans
successfully. It is this one specific scenario that is Seam + el related that I
am trying to figure out.
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=4073043#4073043
Reply to the
I am having a similar problem.
It appears entityManager.flush() is ignored. I never see data making it to
the DB unless all methods in a stack of SLSB methods exit.
If I run the same identical code with a few inserts all is well. If I run it
with thousands of inserts my app crashes due to
I need to build a button to pass an argument to an action method. I can hard
code the parameter and all is fine. I just cannot figure how to dynamically
build it with tags.
Key point: I need to use el to specify the Seam named method and I also need
to use el to specify its argument. This
The URL below suggests s:commandButton exists.
http://jira.jboss.com/jira/browse/JBSEAM-329
and seam_reference.pdf suggests it exists as well.
I am using IceFaces 1.6-DR5, Seam 1.2.1 and JBoss AS 4.0.5.
I need to pass a parameter to an action method that originates from a
serial/com port
Thanks enzhao.
All docs I have seen use commandButton not button. button solves the problem
of the tag not being recognized but it does not seem to support parameters like
examples I have seen.
I get an error parsing the action argument. (presumably due to the presence of
a parameter)
Yes, I noticed and fixed that earlier but it still did not work.
I found this: http://balusc.xs4all.nl/srv/dev-jep-com.html and tried to use
h:commandButton value=PARMTEST
action=#{IButtonMgr.doParm()}
f:attribute name=keyserial value=SERIAL_NUM/
/h:commandButton
along
I must not have re-deployed properly. It is working now.
So now I have an example working with a hard-coded string literal ('sss') as a
parameter.
s:button id=Test action=#{IButtonMgr.writeSettingsP1('sss')}
value=Write Key/
and:
public void
Surely someone has a hint on this. My experience is the transaction
annotations have no effect. -OR- I have misinterpreted something.
My experience: no transactions are committed unless the method in the top
session bean in the call chain exits.
My understanding:
A method annotated with:
JBoss 4.0.5 (em = injected entitymanger in text below)
Need a way to prevent an EntityExistsException from stopping processing (kills
DB connection).
Root problem:
In a loop callimg em.persist(obj);
After an EntityExistsException is thrown I get the following trying to continue
in the same
I saw that there was a past issue: if a queue already contained messages at
startup the MDB would not deploy.
[EJBTHREE-464] - Bean injection fails in MDB during deploy of EAR if JMS
messages already exist in queue
That does not seem to be my problem.
Has no one else seen this problem?
Symptom: Annotated MDB is not detected (apparently). It is not deployed. No
[EJBContainer] STARTED EJB: in log for the MDB. The related JMS topic is not
created automatically.
more info:
I can place the exact same MDB into another ear and it works. I did this
experiment as a debug test.
Seems like there should be a JNDI/context-based lookup to get the WorkManager.
I want to launch some worker threads. The page below and other reading
suggests a lookup can be done:
http://www.java-tips.org/java-ee-tips/enterprise-java-beans/j2ee-connector-architecture-1.5.html
Maybe just
Thank You Weston.
Then let me ask the more generic question:
What is the recommendation to start/manage background worker threads in JBoss
4.0.x?
Using JMS for a long running process seems to be discouraged (like 5 minutes
of background work)
I can implement a Runnable/Thread class and
Several 'standard' JMS tables have composite primary keys. (jms_messages,
jms_subscriptions, ..)
So: It seems like almost everyone would run into this issue using stndard
JBoss. ?
I encountered this problem. When I removed the JMS tables the problem was
gone. Alternative might be:
About the ports.
In conf/jboss-service.xml I am using ports-03:
ports-03
${jboss.home.url}/server/port-bindings.xml
Meaning ports shift from #0## to #3## (like 8380 for http).
I have now learned that If I remove this and use standard ports my problem goes
away. The IDE detects
Thanks for all the help.
You guys are doing a great job and have a great tool set.
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=3969056#3969056
Reply to the post :
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3969056
I just upgraded to IDE 2.0. When I used the server view to start a server it
starts just fine. But, the server view plugin does not detect that it has
started. Its status is: 'starting..' No big deal right. But after a while
something kills the server process. Presumably the IDE assumed
Thanks for the quick reply Rob.
The only entry in the event log is:
Timeout waiting for JBOSS 4.0 4 to start. Server did not start after 50s.
There is no log entry for 'Starting...'
I forgot to mention I also get a dialog box warning with this same message.
I found a place to set server
Thanks again Rob.
I figured it out. I did not go to the optional server setup to indicate I was
using non-standard ports (ports-03). I bet the IDE was looking for the server
at the standard ports. Looks like there is a new way to detect the server
because I have been using ports-03 before.
87 matches
Mail list logo