Re: [JBoss-user] JSP compile problem JBoss 3.2.3 (SOLUTION)

2004-03-11 Thread Eric Klimas
I've found an acceptable workaround.  I found it as a solution to bug
20527 in the apache bug database:
http://issues.apache.org/bugzilla/show_bug.cgi?id=20527

Basically, if you set a system property user.dir, jasper will write to
that directory.  So I simply added an  tag to
$JBOSS_HOME/server/default/deploy/properties-service.xml so it looks
something like:
 .
 .
 .



user.dir=/usr/share/jboss/work/default


 .
 .
 .
*Note* you may need to restart tomcat inside of jboss when you do this,
I did, and my jmx-console is now working.

-Eric

On Wed, 2004-03-10 at 21:28, Eric Klimas wrote:
> Hi all,
> 
> I have a kinda annoying problem on JBoss 3.2.3 w/ Tomcat 4.1 on a Debian
> system when I go to start the jmx-console.  It appears to be caused by
> Jasper trying to write a temporary file in whatever directory I started
> Jboss from.  Keep in mind I have jboss running as a "jboss" userid.  
> 
> The simple solutions are start jboss from a directory where that user
> can write, or open that directory up to that user for write privleges. 
> I'd rather have a better solution of how to direct JBoss/Tomcat/Jasper
> to write to a directory of my choosing to which I've given my "jboss"
> userid permission to write.
> 
> I've tried editing
> $JBOSS_HOME/server/default/deploy/jbossweb-tomcat41.sar/web.xml to add a
> scratchdir parameter for Jasper, with no luck.  I've also played around
> with $JBOSS_HOME/server/default/deploy/properties-service.xml to try and
> set the java.io.tmp property, which also didn't work.
> 
> I've also tried searching all the jboss doco I have (3.2.1 admin devel
> book) and the forums and have come up empty, and its bugging me because
> I'm thinking this has to be simple.  Any help would be appreciated.
> 
> Thanks, 
> 
> Eric
> 
> Attached is the snippet of the exception from server.log.
> 
> 



---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] JSP compile problem JBoss 3.2.3

2004-03-10 Thread Eric Klimas
Hi all,

I have a kinda annoying problem on JBoss 3.2.3 w/ Tomcat 4.1 on a Debian
system when I go to start the jmx-console.  It appears to be caused by
Jasper trying to write a temporary file in whatever directory I started
Jboss from.  Keep in mind I have jboss running as a "jboss" userid.  

The simple solutions are start jboss from a directory where that user
can write, or open that directory up to that user for write privleges. 
I'd rather have a better solution of how to direct JBoss/Tomcat/Jasper
to write to a directory of my choosing to which I've given my "jboss"
userid permission to write.

I've tried editing
$JBOSS_HOME/server/default/deploy/jbossweb-tomcat41.sar/web.xml to add a
scratchdir parameter for Jasper, with no luck.  I've also played around
with $JBOSS_HOME/server/default/deploy/properties-service.xml to try and
set the java.io.tmp property, which also didn't work.

I've also tried searching all the jboss doco I have (3.2.1 admin devel
book) and the forums and have come up empty, and its bugging me because
I'm thinking this has to be simple.  Any help would be appreciated.

Thanks, 

Eric

Attached is the snippet of the exception from server.log.


2004-03-10 20:54:38,822 DEBUG [org.apache.tomcat.util.threads.ThreadPool] Getting new 
thread data
2004-03-10 20:54:45,252 INFO  [org.jboss.web.localhost.Engine] Error compiling file: 
/usr/share/jboss-3.2.3/server/default/work/MainEngine/localhost/jmx-console/index_jsp.java
 [javac] Compiling 1 source file


2004-03-10 20:54:45,255 INFO  [org.jboss.web.localhost.Engine] Info: Compile: 
javaFileName=/usr/share/jboss-3.2.3/server/default/work/MainEngine/localhost/jmx-console/index_jsp.java

classpath=/usr/share/jboss-3.2.3/server/default/tmp/deploy/tmp53288jboss-local-jdbc.rar:/usr/share/jboss-3.2.3/server/default/lib/xalan.jar:/usr/share/jboss-3.2.3/server/default/tmp/deploy/tmp53298jbossmq-destinations-service.xml:/usr/share/jboss-3.2.3/server/default/lib/bsh-deployer.jar:/usr/share/jboss-3.2.3/server/default/lib/jboss-jaas.jar:/usr/share/jboss-3.2.3/server/default/lib/jnet.jar:/usr/share/jboss-3.2.3/server/default/deploy/jmx-invoker-adaptor-server.sar/:/usr/share/jboss-3.2.3/server/default/deploy/jms/jbossmq-httpil.sar/jbossmq-httpil.war/:/usr/share/jboss-3.2.3/server/default/lib/jboss.jar:/usr/share/jboss-3.2.3/server/default/tmp/deploy/tmp53289jboss-xa-jdbc.rar-contents/jboss-xa-jdbc.jar:/usr/share/jboss-3.2.3/server/default/tmp/deploy/tmp53291hsqldb-ds.xml:/usr/share/jboss-3.2.3/server/default/tmp/deploy/tmp53261jboss-service.xml:/usr/share/jboss-3.2.3/server/default/tmp/deploy/tmp53277tomcat-http11.jar:/usr/share/jboss-3.2.3/server/default/tmp/deploy/tmp53284console-mgr.sar-contents/jfreechart-demo.jar:/usr/share/jboss-3.2.3/server/default/tmp/deploy/tmp53269commons-collections.jar:/usr/share/jboss-3.2.3/lib/jboss-system.jar:/usr/share/jboss-3.2.3/server/default/tmp/deploy/tmp53284console-mgr.sar-contents/jfreechart.jar:/usr/lib/j2sdk1.4.2/jre/lib/ext/dnsns.jar:/usr/share/jboss-3.2.3/server/default/tmp/deploy/tmp53299uil2-service.xml:/usr/share/jboss-3.2.3/server/default/tmp/deploy/tmp53268tomcat-jk2.jar:/usr/share/jboss-3.2.3/server/default/tmp/deploy/tmp53279jasper-runtime.jar:/usr/share/jboss-3.2.3/server/default/tmp/deploy/tmp53293oil-service.xml:/usr/share/jboss-3.2.3/server/default/lib/activation.jar:/usr/share/jboss-3.2.3/server/default/tmp/deploy/tmp53266naming-resources.jar:/usr/share/jboss-3.2.3/server/default/tmp/deploy/tmp53285uuid-key-generator.sar:/usr/share/jboss-3.2.3/server/default/tmp/deploy/tmp53292jvm-il-service.xml:/usr/share/jboss-3.2.3/server/default/tmp/deploy/tmp53290jms-ds.xml:/usr/share/jboss-3.2.3/server/default/tmp/deploy/tmp53294hsqldb-jdbc2-service.xml:/usr/share/jboss-3.2.3/server/default/deploy/http-invoker.sar/:/usr/share/jboss-3.2.3/server/default/tmp/deploy/tmp53284console-mgr.sar-contents/jcommon.jar:/usr/share/jboss-3.2.3/server/default/tmp/deploy/tmp53275tomcat-util.jar:/usr/share/jboss-3.2.3/server/default/tmp/deploy/tmp53263catalina.jar:/usr/share/jboss-3.2.3/server/default/lib/snmp-support.jar:/usr/share/jboss-3.2.3/server/default/lib/jboss-transaction.jar:/usr/share/jboss-3.2.3/server/default/tmp/deploy/tmp53264commons-digester.jar:/usr/share/jboss-3.2.3/lib/xml-apis.jar:/usr/share/jboss-3.2.3/server/default/lib/jcert.jar:/usr/share/jboss-3.2.3/server/default/tmp/deploy/tmp53265tomcat-coyote.jar:/usr/share/jboss-3.2.3/server/default/lib/bindingservice-plugin.jar:/usr/share/jboss-3.2.3/lib/jaxp.jar:/usr/share/jboss-3.2.3/server/default/lib/mail.jar:/usr/share/jboss-3.2.3/server/default/tmp/deploy/tmp53297jbossmq-service.xml:/usr/share/jboss-3.2.3/server/default/lib/mail-plugin.jar:/usr/share/jboss-3.2.3/server/default/tmp/deploy/tmp53284console-mgr.sar:/usr/share/jboss-3.2.3/lib/concurrent.jar:/usr/share/jboss-3.2.3/server/default/lib/jbossha.jar:/usr/share/jboss-3.2.3/lib/log4j-boot.jar:/usr/lib/j2sdk1.4.2/jre/lib/ext/localedata.jar:/usr/share/jboss-3.2.3/server/default/conf/:/usr/shar

RE: [JBoss-user] Logging threshold...

2003-02-06 Thread Eric Klimas
Thanks,

I actually tried that earlier, but it didn't work.  From what I gather
it was because I was invoking the reconfigure method that didn't take a
parameter.  As soon as I used the one which took a String parameter and
I filled in the URL, everything worked.

-Eric

On Thu, 2003-02-06 at 13:17, Sebastian Hauer wrote:
> Hi Eric,
> 
> Change your servers log4j.xml file, go to the jmx-console, click on the
> jboss.system:service=Logging,type=Log4jService Mbean link and invoke the
> reconfigure() method.
> 
> Sebastian
> 
> > -----Original Message-
> > From: Eric Klimas [mailto:[EMAIL PROTECTED]] 
> > Sent: Thursday, February 06, 2003 11:52 AM
> > To: [EMAIL PROTECTED]
> > Subject: [JBoss-user] Logging threshold...
> > 
> > 
> > Hi all,
> > 
> > I'm running Jboss3.0.4 Tomcat 4.1.12, and was wondering if 
> > there was some way to change the logging threshold of the 
> > server without having to restart jboss or redeploy my app 
> > (i.e. via the jmx-console).  Probably a simple answer for 
> > somebody, but I can't seem to find it
> 
> 
> ---
> This SF.NET email is sponsored by:
> SourceForge Enterprise Edition + IBM + LinuxWorld http://www.vasoftware.com
> _______
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
-- 
Eric Klimas <[EMAIL PROTECTED]>



---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



[JBoss-user] Logging threshold...

2003-02-06 Thread Eric Klimas
Hi all,

I'm running Jboss3.0.4 Tomcat 4.1.12, and was wondering if there was
some way to change the logging threshold of the server without having to
restart jboss or redeploy my app (i.e. via the jmx-console).  Probably a
simple answer for somebody, but I can't seem to find it

Thanks,
  Eric

-- 
Eric Klimas <[EMAIL PROTECTED]>



---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



[JBoss-user] ClassCastException on PortableRemoteObject.narrow

2003-01-29 Thread Eric Klimas
Hi all,

I'm using Jboss 3.0.4 w/ Tomcat 4.1.12, running Sun's JDK (build
1.4.0_01-b03), on Solaris 7.  I have one ear file which contains a bunch
of local entity CMP 2.0 beans that access my database.  I have a
separate ear file containing a session bean that looks the Entity beans
up via the global JNDI, and trys to use the local interface to do its
work.

The problem I'm encountering, is that if I redeploy the ear file
containing the entity beans without redeploying the ear containing the
session bean, when I go to retrieve my local interface via the following
code I get a ClassCastException:

private UserLocalHome getUserLocalHome()
throws NamingException
{
UserLocalHome home = null;
InitialContext ctx = new InitialContext();

try 
{   
home = (UserLocalHome) 
PortableRemoteObject.narrow(
 ctx.lookup("ejb/iaf/User"), UserLocalHome.class);

}
finally
{
   ctx.close();
}
}

If I simply go and redeploy the ear containing the session bean after
that, everything works again.  Is this supposed to happen and if so, can
somebody explain it.  I know that class files have the notion of a
version, but the interface is really not changing at all between
redeployments, etc.

Also, I read on some jboss-user list archive of people experiencing
similar problems if the ear files contained jndi.properties files.  I
have double-checked this and can assure you that neither of my .ear
files have this.

Thanks in advance for any help,

-Eric

Snippet from server.log w/ exception is attached


2003-01-29 13:56:07,328 ERROR [org.jboss.ejb.plugins.LogInterceptor] EJBException, 
causedBy:
java.lang.ClassCastException
at 
com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:293)
at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:134)
at net.snet.ejb.ait.YahooMigrationManagerEJB.getUserLocalHome(Unknown Source)  
 
at net.snet.ejb.ait.YahooMigrationManagerEJB.migrate(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at 
org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:660)
at 
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
at 
org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:77)
at 
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:107)
at 
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:178)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:60)
at 
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:130)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:204)
at 
org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.java:313)
at org.jboss.ejb.Container.invoke(Container.java:712)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:382)
at sun.reflect.GeneratedMethodAccessor58.invoke(Unknown Source)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
at sun.rmi.transport.Transport$1.run(Transport.java:148)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
at 
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
at java.lang.Thread.run(Thread.java:536)




Re: [JBoss-user] Session

2003-01-20 Thread Eric Klimas
You should be able to that, as long as your local object stays on the
server side.  

In other words don't return it from a remote method call or as part of
another object like a Collection or something so that it ends up on the
client machine.

-Eric


On Mon, 2003-01-20 at 13:18, Gabriel Pinto wrote:
> Is it possible to call a local stateful session bean from a remote
> statefull session bean? Is there any restriction?
> 
> Thanks
> 
> Gabriel
-- 
Eric Klimas <[EMAIL PROTECTED]>



---
This SF.NET email is sponsored by: FREE  SSL Guide from Thawte
are you planning your Web Server Security? Click here to get a FREE
Thawte SSL guide and find the answers to all your  SSL security issues.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] cmp2, postgres and dates

2003-01-13 Thread Eric Klimas
I don't think this is as much a Jboss issue as it might be a Postgres
JDBC driver issue.  I experienced this once before on Postgres 6.x
(probably 6.2).  I recently experimented again with a newer driver on
Postgres 7.x and the problem seems to have gone away.

Unfortunately, I can't offer much more than that.  Maybe try downloading
one of the newer JDBC drivers and try that or consider upgrading
Postgres if you're running an older version.  Also consider writing some
quick JDBC code to see if my theory is even correct, or if we were
experiencing different problems.

-Eric


On Mon, 2003-01-13 at 17:41, Jim Clayson wrote:
> Hi,
> 
> I am experiencing a problem with dates:
> 
> jboss304tomcat406:
> 
> A 'new Date()' passed to an abstract cmp setter sets the date with a 
> millisecond value in the postgres table column. When it does this, it 
> doesn't give it back to me using the getter. The workaround is the 
> reformat the date (using SimpleDateFormat) so that it has no millisecond 
> value and then only can I read the value through the cmp2 engine.
> 
> I am not using any overriding settings in jbosscmp-jdbc.xml. Do I need 
> to provide some way to direct postgres to store dates using a particular 
> class?
> 
> Any help is appreciated.
> 
> jim
> 
> 
> 
> ---
> This SF.NET email is sponsored by: FREE  SSL Guide from Thawte
> are you planning your Web Server Security? Click here to get a FREE
> Thawte SSL guide and find the answers to all your  SSL security issues.
> http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
-- 
Eric Klimas <[EMAIL PROTECTED]>



---
This SF.NET email is sponsored by: FREE  SSL Guide from Thawte
are you planning your Web Server Security? Click here to get a FREE
Thawte SSL guide and find the answers to all your  SSL security issues.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] Using a JBOSS DataSource Outside of JBOSS

2002-12-04 Thread Eric Klimas
Which brings up another question that I've been wondering about.  Is
there a searchable archive for the list?  The last couple time I've
posted I've tried to find previous questions/responses with no luck.

Thanks,
-Eric

On Tue, 2002-12-03 at 17:49, Dan Christopherson wrote:
> Ah, the question everyone gets tired of answering...
> 
> David Jencks wrote:
> > No, definitely not, for some very good reasons that I've explained many
> > times in the past.
> > 
> > david jencks
> > 
> > On 2002.12.03 16:35:01 -0500 Ed Saikali wrote:
> > 
> >>Hi,
> >>
> >>Is it possible to use a JBOSS data source outside JBOSS, is there a way
> >>to put the JBOSS data source in the public part of the JNDI Tree?
> >>
> >>Thanks
> >>Ed
> >>
> >>
-- 
Eric Klimas <[EMAIL PROTECTED]>



---
This SF.net email is sponsored by: Microsoft Visual Studio.NET 
comprehensive development tool, built to increase your 
productivity. Try a free online hosted session at:
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr0003en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] JBoss on Linux Problem

2002-12-02 Thread Eric Klimas
JSP's need to be compiled to a servlet prior to running.  My guess is if
you java home variable is set to the jre (/usr/java/j2sdk1.4.0/jre or
so) there is no java compiler under that path.  Install the full SDK (if
you haven't) and point your java_home variable to the there so it will
find $JAVA_HOME/bin/javac.  The web container will then use javac to
automatically compile your jsp pages when they are first loaded.

There is a way to precompile JSP so you can run your web container on
the jre, I unfortunately can't remember how that works now...

Hope this helps,
-Eric

On Fri, 2002-11-29 at 01:42, [EMAIL PROTECTED] wrote:
> I have some problem when run application on Linux. I was able to start
> JBoss and deploy the application. But facing the problem when try to call
> the jsp page, return nothing. But when I change JRE to version 1.3, it able
> to run without any problem.
> 
> Server spec:
> Linux RedHat 8.0
> JBoss 3.0.4
> JRE 1.4
> 
> Does anybody have expience about this kind of problem, how to fix it?
> 
> Thanks in advance,
> Phuwarin
> 
> 
> 
> ---
> This SF.net email is sponsored by: Get the new Palm Tungsten T 
> handheld. Power & Color in a compact size! 
> http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
-- 
Eric Klimas <[EMAIL PROTECTED]>



---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



[JBoss-user] CMR/CMP Primary-key/Foreign Key Question

2002-11-26 Thread Eric Klimas
Hi all,

I'm trying write entity beans in Jboss 3.0.4 that have a CMR as part of
the primary key.  Is this even possible with EJB (I'd hope so). 
Basically I have the following tables/objects

Tables:
Account:
  accountNum:number
  
  pk: accountNum

Userids:
  accountNum:number
  userid:String
  startdate:date
  
  pk: accountNum, userid, startdate
  fk: accountNum that refs Account table

The relationship is 1-M (accounts-userids) in case you haven't guessed,
so I used xdoclet to build the relationship between the two and I put an
@ejb:pk-field tag on the relationship methods but that doesn't seem to
work in looking at the generated code.  

I also tried at one point to have accountNum on my UserEJB be a
persisted field and tried to have a relation at the same time, but that
didn't work for some reason either (can't remember what it was at this
point)

So my question is, is this possible in CMP 2.0, and if so, can somebody
give me some pointers/advice.

Thanks,
  Eric



---
This SF.net email is sponsored by: Get the new Palm Tungsten T 
handheld. Power & Color in a compact size! 
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] Problem with Finder methods

2002-11-25 Thread Eric Klimas
My apologies on not providing the version before (3.0.4 w/ tcat 4). 

This appears to have been the problem.  I switched my datasources to
non-xa versions and everything is peachy now.

Thx,
-Eric

On Mon, 2002-11-25 at 13:42, David Jencks wrote:
> ALWAYS include your exact jboss version at the very least.
> 
> Probably you dont' have your datasource set up correctly.  AFAIK the xa
> datasource stuff doesn't work very well before 3.2 or 4.  There is some
> oracle specific stuff in these that is supposed to correct many oracle
> driver deficiencies.
> 
> david jencks
> 
> On 2002.11.25 12:38:50 -0500 Eric Klimas wrote:
> > Hi all,
> > 
> > I have a bunch of local entity bean using CMP/CMR being stored over an
> > Oracle XA datasource.  I wrote a remote session bean to access the local
> > objects and called it via my client code and got the following
> > exception.  Everything deploys fine, etc.  I've also included test
> > session bean and client program.
> > 
> > Any feedback, etc. is appreciated,
> > -Eric
> > 
> > Exception in thread "main" javax.ejb.FinderException: Find failed:
> > java.lang.IllegalArgumentException: null xaRes
> > at
> > 
>org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractQueryCommand.execute(JDBCAbstractQueryCommand.java:148)
> > at
> > 
>org.jboss.ejb.plugins.cmp.jdbc.JDBCFindEntityCommand.execute(JDBCFindEntityCommand.java:44)
> > at
> > 
>org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.findEntity(JDBCStoreManager.java:541)
> > at
> > 
>org.jboss.ejb.plugins.CMPPersistenceManager.findEntity(CMPPersistenceManager.java:336)
> > at
> > 
>org.jboss.resource.connectionmanager.CachedConnectionInterceptor.findEntity(CachedConnectionInterceptor.java:301)
> > at
> > org.jboss.ejb.EntityContainer.findLocal(EntityContainer.java:636)
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > at
> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> > at
> > 
>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> > at java.lang.reflect.Method.invoke(Method.java:324)
> > at
> > 
>org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:1119)
> > at
> > org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:73)
> > at
> > 
>org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:206)
> > at
> > 
>org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:215)
> > at
> > org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:73)
> > at
> > 
>org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:90)
> > at
> > 
>org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:79)
> > at
> > 
>org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:44)
> > at
> > 
>org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:111)
> > at
> > 
>org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:178)
> > at
> > org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:52)
> > at
> > org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:105)
> > at
> > org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:129)
> > at
> > org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:487)
> > at
> > 
>org.jboss.ejb.plugins.local.BaseLocalContainerInvoker.invokeHome(BaseLocalContainerInvoker.java:230)
> > at
> > org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:110)
> > at $Proxy488.findByPrimaryKey(Unknown Source)
> > at
> > net.snet.ejb.iaf.RelationshipTestSessionEJB.checkRelationship(Unknown
> > Source)
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > at
> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> > at
> > 
>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> > at java.lang.reflect.Method.invoke(Method.java:324)
> > at
> > 
>org.jboss.ejb.Stateless

[JBoss-user] Problem with Finder methods

2002-11-25 Thread Eric Klimas
ivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
at
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
at java.lang.Thread.run(Thread.java:536)
at
sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
at
sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133)
at
org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknown Source)
at
org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:138)
at
org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:108)
at
org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:77)
at
org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:80)
at
org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:111)
at
org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:76)
at $Proxy1.checkRelationship(Unknown Source)
at RTestClient.main(RTestClient.java:24)



import net.snet.ejb.iaf.*;
import javax.ejb.*;
import javax.naming.*;
import java.rmi.*;
import javax.rmi.*;

public class RTestClient 
{
	public static void main(String[] args) 
	throws Exception
	{
		InitialContext ctx = new InitialContext();

		Object ref = ctx.lookup("ejb/iaf/test/RelationshipTestSession");

		RelationshipTestSessionHome home = (RelationshipTestSessionHome)
PortableRemoteObject.narrow(ref, RelationshipTestSessionHome.class);


		RelationshipTestSession tester = home.create();

		for(int i = 0; i < args.length; i++)
		{
			System.out.println(tester.checkRelationship(Long.parseLong(args[i])));
		}
	}
}


package net.snet.ejb.iaf;

import javax.ejb.*;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import java.util.Collection;
import java.util.Iterator;

/**
 * Sessionbean to test relationships...
 *
 * @author		Eric Klimas
 * @version		$Id$
 * @ejb:beanname="RelationshipTestSession"
 *  display-name="Session bean to test relationships"
 * 			jndi-name="ejb/iaf/test/RelationshipTestSession"
 *  local-jndi-name="ejb/iaf/test/RelationshipTestSession"
 *  view-type="both"
 *  type="Stateless"
 *			transaction-type="Container"
 *
 * @ejb:ejb-transaction type="Required"
 *
 * @ejb:ejb-ref		ejb-name="Account"
 *			view-type="local"
 *			ref-name="ejb/iaf/Account"
 *
 * @ejb:ejb-ref		ejb-name="User"
 *			view-type="local"
 *			ref-name="ejb/iaf/User"
 *
**/
public abstract class RelationshipTestSessionEJB implements SessionBean
{

/**
	 * Finds the Extended Attribute with the given key information.
	 * @exception FinderException thrown when the EA does not exist
	 * @exception UnsupportedOperationException thrown when a "Programatic Attribute" is referenced, which are not currently supported by this library
	 *
	 * @return a populated AttributeData reference with the EA data
	 *
 * @ejb:interface-method	view-type="both"
 *
**/
public String checkRelationship(long custnum)
		throws FinderException
	{
		InitialContext context;
		AccountLocalHome home;

		try {
			context= new InitialContext();
			home= (AccountLocalHome)context.lookup("java:comp/env/ejb/iaf/Account");
		}
		catch(NamingException e) 
		{
			throw new EJBException(e);
		}

		AccountLocal account = home.findByPrimaryKey(new Long(custnum));

		StringBuffer returnValue = new StringBuffer();

		returnValue.append("custnum" + account.getCustnum() + "\n");
		returnValue.append("firstname" + account.getFirstname() + "\n");
		returnValue.append("lastname" + account.getLastname() + "\n");

		Iterator users = account.getUsers().iterator();

		while(users.hasNext())
		{
			UserLocal user = (UserLocal) users.next();

			returnValue.append("user: " + user.getUserId() + "\n");
			returnValue.append("startdate: " + user.getStartDate() + "\n");

			AccountLocal account2 = user.getAccount();

			if(account2 == account) 
			{
returnValue.append("account == account2 \n");
			}
			else
			{
returnValue.append("account != account2 \n");
			}

			if(account2.equals(account))
			{
returnValue.append("account.equals(account2) \n");
			}
			else
			{
returnValue.append(" ! account.equals(account2) \n");
			}

			returnValue.append("custnum" + a

[JBoss-user] Re: Problem with CMR and Postgres

2002-11-11 Thread Eric Klimas
I wanted to thank everybody for their input.  The way I ended up solving
my problem was by putting a  section into my jbosscmp-jdbc.xml
file and defaulted the database to my postgres datasource.  All works
fine and as expected now.

-Eric

On Fri, 2002-11-08 at 18:01, Eric Klimas wrote:
> Hi all,
> I'm trying to do an example program from the Wrox book Professional EJB
> and I'm running into some trouble with a 1-M (judges->cases)
> relationship.  What appears to be happening is when I retrieve the
> Collection via the cmr call to my getAssignedCases() method, the
> container tries to receive it by accessing the hypersonic datasource,
> rather than my Postgres datasource.
> 
> When I deploy, it creates all the CMP tables in Postgres correctly, etc.
> so I'm a little lost on whats going wrong.  Also, if I change the
>  tag in jbosscmp-jdbc.xml to a
>  and specify the datasource everything then
> works, with the exception that it then creates the table to manage the
> relationship.  Attached are a snippet of the my jboss log file, my bean
> files, ejb-jar.xml, jboss.xml, and jbosscmp-jdbc.xml
> 
> Any help/suggestions are appreciated,
>   Eric
> 
> 
> 
> 
> jbosscmp-jdbc.xml
> 
> 
> 
> 
> "http://www.jboss.org/j2ee/dtd/jbosscmp-jdbc_3_0.dtd";>
> 
> 
>   
>   
>   JudgeEJB
>   java:/PostgresDS
>   PostgreSQL
>   court_judges
>   
>   
>   CaseEJB
>   java:/PostgresDS
>   PostgreSQL
>   court_cases
>   
>   
>   
>   
>   judge-has-cases
>   
>   
>   
>JudgeEJB
>   true
>   
>   
>   
>CaseEJB
>   true
>   
>   
>   
>   
> 
> jboss.xml
> 
> 
> 
> "http://www.jboss.org/j2ee/dtd/jboss_2_4.dtd";>
> 
> 
>
> 
>   
>  JudgeEJB
>  examples/JudgeEJB
>   
>   
>  CaseEJB
>  java:examples/CaseLocal
>   
>
> 
> 
>  jboss.log
> 
> 
> 
> 19:23:10,769 ERROR [LogInterceptor] EJBException, causedBy:
> java.sql.SQLException: Table not found: COURT_CASES in statement [SELECT 
>docketNumberPK FROM court_cases WHERE (JudgeEJB_assignedCases=1)]
> at org.hsqldb.Trace.getError(Trace.java:180)
> at org.hsqldb.Result.(Result.java:175)
> at org.hsqldb.jdbcConnection.executeHSQL(jdbcConnection.java:907)
> at org.hsqldb.jdbcConnection.execute(jdbcConnection.java:718)
> at org.hsqldb.jdbcStatement.fetchResult(jdbcStatement.java:686)
> at org.hsqldb.jdbcStatement.executeQuery(jdbcStatement.java:68)
> at 
>org.hsqldb.jdbcPreparedStatement.executeQuery(jdbcPreparedStatement.java:133)
> at 
>org.jboss.resource.adapter.jdbc.local.LocalPreparedStatement.executeQuery(LocalPreparedStatement.java:289)
> at 
>org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadRelationCommand.execute(JDBCLoadRelationCommand.java:101)
> at 
>org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadRelation(JDBCStoreManager.java:643)
> at 
>org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.load(JDBCCMRFieldBridge.java:830)
> at 
>org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.getInstanceValue(JDBCCMRFieldBridge.java:491)
> at 
>org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.getValue(JDBCCMRFieldBridge.java:465)
> at 
>org.jboss.ejb.plugins.cmp.bridge.EntityBridgeInvocationHandler.invoke(EntityBridgeInvocationHandler.java:124)
> at org.jboss.proxy.compiler.Runtime.invoke(Runtime.java:59)
> at 
>org.klimas.ejb.examples.judge_example.JudgeBean$Proxy.getAssignedCases()
> at org.klimas.ejb.examples.judge_example.JudgeBean.assignNewCase(Unknown 
>Source)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
>sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at 
>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:324)
> at 
>org.jboss.ejb.EntityContainer$ContainerInterceptor.invoke(EntityContainer.java:1194)
> at 
>org.jboss.ejb.plugins.cmp.jdbc.JDBCRela

[JBoss-user] Problem with CMR and Postgres

2002-11-08 Thread Eric Klimas
Hi all,
I'm trying to do an example program from the Wrox book Professional EJB
and I'm running into some trouble with a 1-M (judges->cases)
relationship.  What appears to be happening is when I retrieve the
Collection via the cmr call to my getAssignedCases() method, the
container tries to receive it by accessing the hypersonic datasource,
rather than my Postgres datasource.

When I deploy, it creates all the CMP tables in Postgres correctly, etc.
so I'm a little lost on whats going wrong.  Also, if I change the
 tag in jbosscmp-jdbc.xml to a
 and specify the datasource everything then
works, with the exception that it then creates the table to manage the
relationship.  Attached are a snippet of the my jboss log file, my bean
files, ejb-jar.xml, jboss.xml, and jbosscmp-jdbc.xml

Any help/suggestions are appreciated,
  Eric




jbosscmp-jdbc.xml




http://www.jboss.org/j2ee/dtd/jbosscmp-jdbc_3_0.dtd";>




JudgeEJB
java:/PostgresDS
PostgreSQL
court_judges


CaseEJB
java:/PostgresDS
PostgreSQL
court_cases




judge-has-cases



JudgeEJB
true



CaseEJB
true





jboss.xml



http://www.jboss.org/j2ee/dtd/jboss_2_4.dtd";>


   

  
 JudgeEJB
 examples/JudgeEJB
  
  
 CaseEJB
 java:examples/CaseLocal
  
   


 jboss.log



19:23:10,769 ERROR [LogInterceptor] EJBException, causedBy:
java.sql.SQLException: Table not found: COURT_CASES in statement [SELECT 
docketNumberPK FROM court_cases WHERE (JudgeEJB_assignedCases=1)]
at org.hsqldb.Trace.getError(Trace.java:180)
at org.hsqldb.Result.(Result.java:175)
at org.hsqldb.jdbcConnection.executeHSQL(jdbcConnection.java:907)
at org.hsqldb.jdbcConnection.execute(jdbcConnection.java:718)
at org.hsqldb.jdbcStatement.fetchResult(jdbcStatement.java:686)
at org.hsqldb.jdbcStatement.executeQuery(jdbcStatement.java:68)
at 
org.hsqldb.jdbcPreparedStatement.executeQuery(jdbcPreparedStatement.java:133)
at 
org.jboss.resource.adapter.jdbc.local.LocalPreparedStatement.executeQuery(LocalPreparedStatement.java:289)
at 
org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadRelationCommand.execute(JDBCLoadRelationCommand.java:101)
at 
org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadRelation(JDBCStoreManager.java:643)
at 
org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.load(JDBCCMRFieldBridge.java:830)
at 
org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.getInstanceValue(JDBCCMRFieldBridge.java:491)
at 
org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.getValue(JDBCCMRFieldBridge.java:465)
at 
org.jboss.ejb.plugins.cmp.bridge.EntityBridgeInvocationHandler.invoke(EntityBridgeInvocationHandler.java:124)
at org.jboss.proxy.compiler.Runtime.invoke(Runtime.java:59)
at 
org.klimas.ejb.examples.judge_example.JudgeBean$Proxy.getAssignedCases()
at org.klimas.ejb.examples.judge_example.JudgeBean.assignNewCase(Unknown 
Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at 
org.jboss.ejb.EntityContainer$ContainerInterceptor.invoke(EntityContainer.java:1194)
at 
org.jboss.ejb.plugins.cmp.jdbc.JDBCRelationInterceptor.invoke(JDBCRelationInterceptor.java:95)
at 
org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySynchronizationInterceptor.java:308)
at 
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
at 
org.jboss.ejb.plugins.EntityReentranceInterceptor.invoke(EntityReentranceInterceptor.java:90)
at 
org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterceptor.java:152)
at 
org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.java:107)
at 
org.jboss.ejb.plugins.EntityCreationInterceptor.invoke(EntityCreationInterceptor.java:69)
at 
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:107)
at 
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:178)
at org.jboss.ejb.plugins.TxIn