フォーラム

ホーム » Liferay Portal » English » 3. Development

構造的に表示 平面上に表示 ツリー上に表示
スレッド [ 前へ | 次へ ]
toggle
Ricardo Uhalde
JSF Portlet + datasource + data binding components = PROBLEMS!
2008/02/28 6:16
答え

Ricardo Uhalde

ランク: New Member

投稿: 9

参加年月日: 2007/09/20

最近の投稿

Hi all,

I'm using Java Studio Creator 2 for development, managed to code and deploy 8 portlets with no problem at all BUT, data binding problems.

All my databindings don't work, no matter what I do , I've used plain JDBC API to access my datasources and bound manually all componentes as an alternative solution, not elegant but functional! emoticon

Also downloaded Liferay 4.4 to see if is my version (using Liferay 4.2) but after deploying one test portlet with a dropdown bound to a datasource, I obtain same error as with 4.2 version, like this:

2008-02-28 13:54:12,343 [http-8080-Processor23] ERROR org.apache.catalina.core.ContainerBase.... - Servlet.service() for servlet jsp threw exception
javax.faces.el.EvaluationException: java.lang.RuntimeException: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'
at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:206)
at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:154)
....................................................................

My test portlet works ok with Pluto portal, bound with Java Studio Creator 2, data bindings are all OK.

I've searched lots of forums for days, but none seems to know the answer. I'm really lost, could some specialist explain why Tomcat doesn't know where my datasource is?? or how can I add manually datasource definition to Tomcat??

Thanks in advance!!
Ricardo Uhalde
RE: JSF Portlet + datasource + data binding components = PROBLEMS
2008/02/28 9:09
答え

Ricardo Uhalde

ランク: New Member

投稿: 9

参加年月日: 2007/09/20

最近の投稿

Nevermind this, found the solution by reading TOMCAT DOCUMENTATION, why we programmers tend to search in Google what is really obvious, read the friggin documentation!!!

Anyway, solution is to define JSF portlet datasource reference inside context.xml file like this:

<Resource
auth="Container"
name="jdbc/MyDatasourcer"
type="javax.sql.DataSource"
driverClassName="com.mysql.jdbc.Driver"
password="pass"
maxIdle="30"
maxWait="10000"
username="root"
url="jdbc:mysql://localhost:3306/mydatabase"
maxActive="100"/>

Just simple as that.... emoticon
Mauricio Miguel Brazão
RE: JSF Portlet + datasource + data binding components = PROBLEMS
2008/03/11 17:02
答え

Mauricio Miguel Brazão

ランク: New Member

投稿: 14

参加年月日: 2007/09/14

最近の投稿

hi!
When i put the datasource in the context.xml the 1 problem disapear. But i have this problem:

I create a portlet (in java studio creator) with a table component that access a mysql database.
I deploy the portlet and when i try de portlet, something strage hapens:
- when i do something in the table, the contents of the table disapear.
To see again the contents, i must maximaze the portlet and than turn to the normal.

Could some one help me?
chinna singareddy
RE: JSF Portlet + datasource + data binding components = PROBLEMS!
2010/11/24 22:15
答え

chinna singareddy

ランク: New Member

投稿: 3

参加年月日: 2010/11/16

最近の投稿

Hi everybody i am trying to connect database using Liferay tomcat
i am getting the following error


Target server does support automatic datsource creation

Please help me anyone
Nagendra Kumar Busam
RE: JSF Portlet + datasource + data binding components = PROBLEMS!
2010/11/25 2:35
答え

Nagendra Kumar Busam

ランク: Liferay Master

投稿: 653

参加年月日: 2009/07/07

最近の投稿

Which version of Liferay are you using
chinna singareddy
RE: JSF Portlet + datasource + data binding components = PROBLEMS!
2010/11/29 2:42
答え

chinna singareddy

ランク: New Member

投稿: 3

参加年月日: 2010/11/16

最近の投稿

I am using Liferayportal 5.2.3