[JBoss-user] [Tomcat, HTTPD, Servlets JSP] - errorPage produces 'Unreachable code'

2006-02-20 Thread grafl
Hi,

I wrote the simple 'Hello world!' application (session bean, JSP)
and packaged them into an ear. It works fine. But when I want to
test the error handlig in JSP with error.jsp it throws the 

'Unreachable code' 

exception. Why ?

Is not enough creating a simple error.jsp and
using %@ page errorPage=../error.jsp % directive in my JSP
page?

I am using JBoss-4.0.3 (Tomcat 5.5).
--
Laszlo

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3924971#3924971

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3924971


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Persistence,JBoss/CMP, Hibernate, Database] - one-to-many with XDoclet

2006-02-20 Thread grafl
Hi,

I am using JBoss-4.0.3.
Shortly my scenarion:

Table definitions:

-- Categories

  id   integer not null 
name   varchar(50) not null -- books:category


-- Books

  id   integer not null 
   title   varchar(50) not null
category   integer not null 


The CMP Entity beans:

/* Categories */
...
/**
 * @ejb.interface-method
 *
 * @ejb.relation name=CategoriesBooks
 *role-name=CategoryHasBooks
 *target-ejb=BooksBean
 *target-role-name=CategoryOfBook
 *
 * @jboss.relation fk-column=category
 * related-pk-field=id
 *
 */
public abstract Collection getBooks();
/** @ejb.interface-method  */
public abstract void setBooks(Collection c);


/* Books */
...
/**
 * @ejb.interface-method
 *
 * @ejb.relation name=CategoriesBooks
 *role-name=CategoryOfBook
 *target-ejb=CategoriesBean
 *target-role-name=CategoryHasBooks
 *target-multiple=yes
 *
 * @jboss.relation fk-column=id
 * related-pk-field=id
 *
 */
public abstract Collection getCategories();
/**  @ejb.interface-method */
public abstract void setCategories(Collection c);


The output looks like this:

[CategoriesSFBean]   ejbCreate
[CategoriesBean#findByPrimaryKey] Executing SQL: SELECT t0_CategoriesBean.id 
FROM categories t0_CategoriesBean WHERE t0_CategoriesBean.id=?
[CategoriesBean] Executing SQL: SELECT name FROM categories WHERE (id=?)
[CategoriesBean] load relation SQL: SELECT category FROM 
categoriesbean_books_booksbean_categories WHERE (id=?)

But my goal is to see all the books that belong to one (specified) category. 
What should I modify to have something like this:

SELECT id, title, category FROM categoriesbean_books_booksbean_categories WHERE 
(category=?)

?


Laszlo



View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3924983#3924983

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3924983


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Persistence,JBoss/CMP, Hibernate, Database] - Authentication violation

2006-01-19 Thread grafl
Hi all,

My scenario looks like this:
WinXP(SP2), JDK 1.5.0_04, jboss-4.0.3SP1, ASA 9.0.0.1108

The db connection is defined in sybase-ds.xml as follows:


  local-tx-datasource
jndi-nameASA9DS/jndi-name
connection-urljdbc:sybase:Tds:xxx.xxx.xxx.xxx:2638/db01/connection-url
driver-classcom.sybase.jdbc2.jdbc.SybDataSource/driver-class
user-namedba/user-name
sql
exception-sorter-class-name
  org.jboss.resource.adapter.jdbc.vendor.SybaseExceptionSorter
/exception-sorter-class-name

  type-mappingSybase/type-mapping

  /local-tx-datasource


My BMP session bean updates a row in ASA using this code:

public int updateXXX(String id) throws RemoteException{
  DataSource ds = null;
  Connection dbconn = null;
  int rv = 0;
  try {
InitialContext ic = new InitialContext();
ds = (DataSource)ic.lookup(JNDINames.DB);
dbconn = ds.getConnection();
PreparedStatement stmt = null;
ResultSet result = null;
String queryStr = update ;
stmt = dbconn.prepareStatement(queryStr);
rv = stmt.executeUpdate();
result = null;
stmt = null;
dbconn.close();
  }catch(Exception e){
cat.error(SQL error during update: , e);
  }finally {
try {
  dbconn.close();
} catch(SQLException e2) {
  cat.error(SQL error in final section: , e2);
}
  }
  return(rv);
}

The problem is that the first update attempt works fine but from that
moment any subsequent attempts fail. Why?

Please help me, it is urgent.
Thank you,

Laszlo.


View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3918328#3918328

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3918328


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Persistence,JBoss/CMP, Hibernate, Database] - Authentication violation

2006-01-19 Thread grafl
I forget the trace:

com.sybase.jdbc2.jdbc.SybSQLException: ASA Error -98: Authentication violation
at com.sybase.jdbc2.tds.Tds.processEed(Tds.java:2538)
at com.sybase.jdbc2.tds.Tds.nextResult(Tds.java:1922)
at com.sybase.jdbc2.jdbc.ResultGetter.nextResult(ResultGetter.java:69)
at com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement.java:201)
at com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement.java:182)
at com.sybase.jdbc2.jdbc.SybStatement.updateLoop(SybStatement.java:1611)
at 
com.sybase.jdbc2.jdbc.SybStatement.executeUpdate(SybStatement.java:1594)
at 
com.sybase.jdbc2.jdbc.SybPreparedStatement.executeUpdate(SybPreparedStatement.java:89)
at 
org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:227)
at com.axis.raba.component.szemely.ejb.SzemelyEJB.updateSzemely(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:585)
at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
at 
org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:214)
at 
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:149)

at 
org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.java:54)
at 
org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
at 
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:106)
at 
org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(AbstractTxInterceptorBMT.java:158)
at 
org.jboss.ejb.plugins.TxInterceptorBMT.invoke(TxInterceptorBMT.java:62)
at 
org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:154
)
at 
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:153)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
at 
org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
at 
org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
at org.jboss.ejb.Container.invoke(Container.java:873)
at sun.reflect.GeneratedMethodAccessor80.invoke(Unknown Source)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at 
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at 
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at 
org.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(LocalInvoker.java:155)
at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:104)
at 
org.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerInterceptor.java:179)
at 
org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:165)
at 
org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
at 
org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:55)
at 
org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:97)
at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:86)
at $Proxy150.updateSzemely(Unknown Source)
at 
org.apache.jsp.szemely.szemely_005fupdate_jsp._jspService(org.apache.jsp.szemely.szemely_005fupdate_jsp:98)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at 
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
at 

[JBoss-user] [Persistence,JBoss/CMP, Hibernate, Database] - starting with hibernate

2005-10-20 Thread grafl
Hi all,

I downloaded jboss-4.0.3 and hibernate-3.1 and test them
separately. They are working fine.

Can somebody guide me in my efforts to configure jboss
and hibernate to cooperate?

Thank you.

Laci

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3902243#3902243

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3902243


---
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Installation, Configuration Deployment] - log4j appends to console too

2005-07-18 Thread grafl
Hi all

To separate the log from my application I made the suggested modifications 
(http://wiki.jboss.org/wiki/Wiki.jsp?page=Logging). I created a new appender is

-appender name=myapp class=org.apache.log4j.FileAppender-
  -errorHandler class=org.jboss.logging.util.OnlyOnceErrorHandler/-
  -param name=Append value=false/
  -param name=File value=${jboss.server.home.dir}/log/myapp.log/-
  -layout class=org.apache.log4j.PatternLayout-
 -param name=ConversionPattern value=%d{ABSOLUTE} %-5p [%c{1}] 
%m%n/-
  -/layout-
  -filter class=org.jboss.logging.filter.TCLFilter-
 -param name=AcceptOnMatch value=true/-
 -param name=DeployURL value=exlybris.ear/-
  -/filter-
   -/appender-

the new category is

-category name=gl.myapp-
 -appender-ref ref=myapp/-
-/category-

and the ref in root is

-appender-ref ref=myapp/-.

My problem is that, the logged message appears on console once and in my log 
file twice. How can I configure log4j to log only in my log file, without 
console?

Thank you.

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3885242#3885242

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3885242


---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [JNDI/Naming/Network] - Naming confusion?

2005-07-14 Thread grafl
Hi

My oracle-ds.xml contains a datasource called X4PooledDS, which at
start is bounded to the 'java:CM2004PooledDS' jndi name, and in my
tag classes I use the 'jdbc/X4PooledDS', where and how can I link
these together?

Thank you, Laszlo.

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3884965#3884965

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3884965


---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Persistence CMP/JBoss] - special primary key

2005-07-12 Thread grafl
Hi
I have the following tables:

-- countries --
int id (pk)
string name
string shortname

-- languages --
int id (pk)
string language

-- countrylanguages --
int country (pk) fk countries:id
int language (pk) fk languages:id

Can somebody give me a CMP entity bean example and the related xml files for 
the last table?

Thank you

Laszlo

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3884499#3884499

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3884499


---
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP,
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Persistence CMP/JBoss] - The source code of the 'Ganster Portal'

2005-06-30 Thread grafl
Hi all

Where can I find the source of the 'Gangster Portal' mentioned in chapter 11. 
'The CMP Engine' of 'The JBoss 4 Application Server Guide'?

Laci

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3883197#3883197

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3883197


---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB/JBoss] - EJB examples for jboss-4.0.2 (both, sesion and entity)

2005-05-04 Thread grafl
Hi all,

I am a newbie in EJB and I am an example-centric. Can somebody send me some EJB 
(session and entity) source code and tell me how can I deploy them using 
jboss-4.0.1?

Thank you,

Laszlo
(lgraf at web.de)


View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3876414#3876414

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3876414


---
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user