Re: [Informal poll] Version number for Jakarta EE-supporting Tapestry version

2024-08-01 Thread Andreas Ernst

Am 01.08.24 um 10:36 schrieb Kalle Korhonen:

I would just call it Tapestry 6.x. It's not going to be compatible with any
previous version, or even with previous servlet containers. I well know the
history ("there will never be Tapesty 6") but past is past, there's no good
reason to avoid a new major, semantic version to indicate the difference.

My two cents,


+1

I understand your arguments Thiago, this is Apache Tapestry 5, so the 
version must start with 5.


I'm with Kalle to bring the version with Jakarta EE to version 6 as the 
changes are too extensive.

Also to the outside.

And we also have enough space in the 5 branch.

Regards
Andreas
PS.: translated with DeepL
--
ae | Andreas Ernst | IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
a...@ae-online.de | www.ae-online.de
www.tachyon-online.de


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



IntelliJ Plugin

2024-04-25 Thread Andreas Ernst

Hi,

for the new Version of IntelliJ there is no actuell Plugin anymore, it's 
now obsolete.


I tried to update it to the new IntelliJ Version, but due to some 
deprecated classes, this need a deeper refactoring.


Is there anyone who tried it also or already done this?

Regards
Andreas
--
ae | Andreas Ernst | IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
a...@ae-online.de | www.ae-online.de
www.tachyon-online.de

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Tapestry Security

2022-05-05 Thread Andreas Ernst

Hi,

are the any Plans to Update Tapestry Security for the new Tapestry Version.

With the latest i got serveral errors, like:

Unable to instantiate class 
org.apache.tapestry5.http.modules.TapestryHttpModule as a module: 
Exception constructing service 'ServiceOverride': Error invoking service 
contribution method 
org.apache.tapestry5.modules.TapestryModule.productionModeOverrides(MappedConfiguration, 
boolean): Exception constructing service 'ApplicationDefaults': Error 
invoking service contribution method 
de.aeits.motd.services.AppModule.setupEnvironment(MappedConfiguration): 
Exception constructing service 'TypeCoercer': Error invoking service 
contribution method 
org.apache.tapestry5.http.modules.TapestryHttpModule.contributeTypeCoercer(MappedConfiguration): 
'void 
org.apache.tapestry5.commons.services.CoercionTuple.add(org.apache.tapestry5.commons.MappedConfiguration, 
java.lang.Class, java.lang.Class, 
org.apache.tapestry5.commons.services.Coercion)'



Thx
Andreas
--
ae | Andreas Ernst | IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
a...@ae-online.de | www.ae-online.de
www.tachyon-online.de

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Build Tapestry with Maven

2020-12-04 Thread Andreas Ernst

Hi,

i checkout the sources and do not find any Tapestry pom.xml.

So i can only build Tapestry with Gradle?

Thx
Andreas
--
ae | Andreas Ernst | IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
a...@ae-online.de | www.ae-online.de
www.tachyon-online.de

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Table Grid

2020-09-05 Thread Andreas Ernst

Am 05.09.20 um 09:12 schrieb Andreas Ernst:



Am 05.09.20 um 08:59 schrieb Andreas Ernst:

Hi,

it seems that the Table Grid crashes with more that 300 000 rows.

Testet with 5.5.0 and 5.6.0.

I used Payara Server 5.201 and 5.2020.4. The server died sometimes 
with error message like


[ERROR] TapestryModule.RequestExceptionHandler Processing of request 
failed with uncaught exception: java.lang.OutOfMemoryError: Java heap 
space

java.lang.OutOfMemoryError: Java heap space


Setting -Xmx2048m on Payara solved the issue, sorry for the noise...

--
ae | Andreas Ernst | IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
a...@ae-online.de | www.ae-online.de
www.tachyon-online.de

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Table Grid

2020-09-05 Thread Andreas Ernst




Am 05.09.20 um 08:59 schrieb Andreas Ernst:

Hi,

it seems that the Table Grid crashes with more that 300 000 rows.

Testet with 5.5.0 and 5.6.0.

I used Payara Server 5.201 and 5.2020.4. The server died sometimes with 
error message like


[ERROR] TapestryModule.RequestExceptionHandler Processing of request 
failed with uncaught exception: java.lang.OutOfMemoryError: Java heap space

java.lang.OutOfMemoryError: Java heap space


Maybe it not a Tapestry issue:

[ERROR] TapestryModule.RequestExceptionHandler Processing of request 
failed with uncaught exception: java.lang.OutOfMemoryError: Java heap space

java.lang.OutOfMemoryError: Java heap space
at java.util.HashMap.resize(HashMap.java:704)
at java.util.HashMap.putVal(HashMap.java:663)
at java.util.HashMap.put(HashMap.java:612)
at 
org.eclipse.persistence.internal.identitymaps.UnitOfWorkIdentityMap.putCacheKeyIfAbsent(UnitOfWorkIdentityMap.java:146)
at 
org.eclipse.persistence.internal.identitymaps.UnitOfWorkIdentityMap.acquireLock(UnitOfWorkIdentityMap.java:72)
at 
org.eclipse.persistence.internal.identitymaps.IdentityMapManager.acquireLock(IdentityMapManager.java:184)
at 
org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildWorkingCopyCloneFromRow(ObjectBuilder.java:2150)
at 
org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildObjectInUnitOfWork(ObjectBuilder.java:858)
at 
org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:745)
at 
org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:699)
at 
org.eclipse.persistence.queries.ObjectLevelReadQuery.buildObject(ObjectLevelReadQuery.java:861)
at 
org.eclipse.persistence.queries.ReadAllQuery.registerResultInUnitOfWork(ReadAllQuery.java:987)
at 
org.eclipse.persistence.queries.ReadAllQuery.executeObjectLevelReadQuery(ReadAllQuery.java:598)
at 
org.eclipse.persistence.queries.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:1232)
at 
org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:911)
at 
org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:1191)
at 
org.eclipse.persistence.queries.ReadAllQuery.execute(ReadAllQuery.java:485)
at 
org.eclipse.persistence.queries.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:1279)
at 
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2983)
at 
org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1898)
at 
org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1880)
at 
org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1845)
at 
org.eclipse.persistence.internal.jpa.QueryImpl.executeReadQuery(QueryImpl.java:262)
at 
org.eclipse.persistence.internal.jpa.QueryImpl.getResultList(QueryImpl.java:482)
at 
de.aeits.extranet.pages.HeizungListe.getHeizungen(HeizungListe.java:35)

at $InternalPropertyConduit_9f12289a8c1a.get(Unknown Source)
at 
org.apache.tapestry5.internal.bindings.PropBinding.get(PropBinding.java:63)
at 
org.apache.tapestry5.internal.transform.ParameterWorker$3$1.readFromBinding(ParameterWorker.java:263)
at 
org.apache.tapestry5.internal.transform.ParameterWorker$3$1.get(ParameterWorker.java:381)
at 
org.apache.tapestry5.corelib.components.Grid.conduit_get_source(Grid.java)
at 
org.apache.tapestry5.corelib.components.Grid.setupDataSource(Grid.java:553)
at 
org.apache.tapestry5.corelib.components.Grid.setupRender(Grid.java:513)


I will investigate.

--
ae | Andreas Ernst | IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
a...@ae-online.de | www.ae-online.de
www.tachyon-online.de

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Table Grid

2020-09-05 Thread Andreas Ernst

Hi,

it seems that the Table Grid crashes with more that 300 000 rows.

Testet with 5.5.0 and 5.6.0.

I used Payara Server 5.201 and 5.2020.4. The server died sometimes with 
error message like


[ERROR] TapestryModule.RequestExceptionHandler Processing of request 
failed with uncaught exception: java.lang.OutOfMemoryError: Java heap space

java.lang.OutOfMemoryError: Java heap space

Should i open a ticket or is this a limit of Grid?

Thx
Andy
--
ae | Andreas Ernst | IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
a...@ae-online.de | www.ae-online.de
www.tachyon-online.de

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Cannot execute Maven goal to build Tapestry 5.4.x from Getting started guide nor from the example source using Maven

2019-07-07 Thread Andreas Ernst

I don't know, what you are doing...
I have no issues getting the quickstart running...

mvn -DarchetypeGroupId=org.apache.tapestry 
-DarchetypeArtifactId=quickstart -DarchetypeVersion=5.4.4 
-DarchetypeRepository=local -DgroupId=de.aeits.tap 
-DartifactId=mavenproject3 -Dversion=0.0.1-SNAPSHOT 
-Dpackage=de.aeits.tap.mavenproject3 
-Dbasedir=/Users/andreas/Documents/NetBeansProjects 
-Darchetype.interactive=false --batch-mode 
org.apache.maven.plugins:maven-archetype-plugin:2.4:generate


I am using NetBeans with JDK 12 to generate this: Maven -> Project from 
ArcheType.


Then update the POM:

-- SNIP --



org.apache.maven.plugins
maven-compiler-plugin
3.8.1

1.8
1.8
true




org.apache.maven.plugins
maven-surefire-plugin
3.0.0-M3



Qa




-- SNAP --

Adding Payara as Server, then start and have fun ;)

I just tried it on the terminal with:

openjdk version "1.8.0_212"
OpenJDK Runtime Environment Corretto-8.212.04.2 (build 1.8.0_212-b04)
OpenJDK 64-Bit Server VM Corretto-8.212.04.2 (build 25.212-b04, mixed mode)

Works also.

--
ae | Andreas Ernst | IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
a...@ae-online.de | www.ae-online.de
www.tachyon-online.de

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Cannot execute Maven goal to build Tapestry 5.4.x from Getting started guide nor from the example source using Maven

2019-07-07 Thread Andreas Ernst

Hi Tobias,

try it this way with the maven archetype:

https://tapestry.apache.org/getting-started.html

HTH,
Andreas

Am 07.07.19 um 12:42 schrieb Tobias Scholze:

Thanks Andreas!

This was indeed set to 1.5.

Nevertheless my next problem during the `mvn install` command is:

[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-surefire-plugin:2.15:test (default-test) on
project hotels: Execution default-test of goal
org.apache.maven.plugins:maven-surefire-plugin:2.15:test failed: There was
an error in the forked process
[ERROR] org.testng.TestNGException:
[ERROR] Cannot find class in classpath:
org.apache.tapestry5.test.SeleniumLauncher

Maybe the example is not the best entry point to just "clone and run
it"-experience. I'll try it to set it up newly from ground level.

Best wishes,

- Tobi


Am So., 7. Juli 2019 um 12:32 Uhr schrieb Andreas Ernst :


Hi Tobias,

Am 07.07.19 um 12:24 schrieb Tobias Scholze:

Hi Andreas,
thanks for your fast reply!
Gosh, I over read the "tip" in the error message. But do this means, that
Apache Tapestry _requires_ a JDK 1.5?

I double checked it and I'm running 1.8.


check your POM, i am running with JDK 1.8:

  
  org.apache.maven.plugins
  maven-compiler-plugin
  3.8.1
  
  1.8
  1.8
  true
  
      

HTH,
Andreas
--
ae | Andreas Ernst | IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
a...@ae-online.de | www.ae-online.de
www.tachyon-online.de

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org






--
ae | Andreas Ernst | IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
a...@ae-online.de | www.ae-online.de
www.tachyon-online.de

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Cannot execute Maven goal to build Tapestry 5.4.x from Getting started guide nor from the example source using Maven

2019-07-07 Thread Andreas Ernst

Hi Tobias,

Am 07.07.19 um 12:24 schrieb Tobias Scholze:

Hi Andreas,
thanks for your fast reply!
Gosh, I over read the "tip" in the error message. But do this means, that
Apache Tapestry _requires_ a JDK 1.5?

I double checked it and I'm running 1.8.


check your POM, i am running with JDK 1.8:


org.apache.maven.plugins
maven-compiler-plugin
3.8.1

1.8
1.8
true



HTH,
Andreas
--
ae | Andreas Ernst | IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
a...@ae-online.de | www.ae-online.de
www.tachyon-online.de

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Cannot execute Maven goal to build Tapestry 5.4.x from Getting started guide nor from the example source using Maven

2019-07-07 Thread Andreas Ernst

Hi Tobias,

Am 07.07.19 um 11:48 schrieb Tobias Scholze:

Hi community,

nearly a decade ago I was involved in a project that was based on Apache
Tapestry. It was great for an Java Web beginner to start with.
After all this years, I want to go back to my roots and re-try or
re-evaluate Tapestry again.

## Problem

Sad to say, that I was not able to get Tapestry with the current Getting
started or Hotel Booking examples running on my machine.

## Versions

Java version: 1.8.0_191
Apache Maven version: 3.6.0
Operating system: Windows 10 (1903)

## Errors

### Getting started:

[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-archetype-plugin:3.0.1:generate
(default-cli) on project standalone-pom: org

.apache.maven.archetype.exception.ArchetypeGenerationFailure: Error merging
velocity templates: Lexical error,   Encountered: "\ufffd" (65
 533), after : "" at
archetype-resources/src/main/webapp/mybootstrap/fonts/glyphicons-halflings-regular.eot[line
16, column 21] -> [Help 1]

### Hotel booking example

[ERROR]
/C:/Users/tobia/IdeaProjects/tapestry5-hotel-booking/src/main/java/com/tap5/hotelbooking/services/BasicAuthenticator.java:[87,13]
try-with-resources is not supported in -source 1.5


check your JDK Version in the project: -source 1.5

HTH
Andreas
--
ae | Andreas Ernst | IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
a...@ae-online.de | www.ae-online.de
www.tachyon-online.de

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: mail-resource Mail session

2018-09-13 Thread Andreas Ernst

Hi Thiago,

maybe i give to less informations.

Am 11.09.18 um 14:13 schrieb Thiago H. de Paula Figueiredo:

On Sun, Sep 9, 2018 at 12:22 PM Andreas Ernst  wrote:


Hi,



Hi!



i try to access a Payara Mailsession (mail-resource), but it is always
null:

@Stateless
public class MailSessionBean {

private static final Logger logger =
Logger.getLogger(MailSessionBean.class.getName());
@Resource(name = "mail/motdSession")
private Session mailSession;



Shouldn't you use @Inject instead of @Resource? What's the fully qualified
name of the @Stateless and @Resource annotations you're using?


This is the bean, where mail is created:

@Stateless
public class MailSessionBean {

  private static final Logger logger = 
Logger.getLogger(MailSessionBean.class.getName());

  @Resource(lookup = "mail/motdSession")
  private Session mailSession;

  public void sendEmail(String to, String subject, String body) {
MimeMessage message = new MimeMessage(mailSession);
try {
  message.setFrom(new 
InternetAddress(mailSession.getProperty("mail.from")));

  InternetAddress[] address = {new InternetAddress(to)};
  message.setRecipients(Message.RecipientType.TO, address);
  message.setSubject(subject);
  message.setSentDate(new Date());
  message.setText(body);
  Transport.send(message);
} catch (MessagingException ex) {
}
  }
}

Here is the Tapestry page:

import de.aeits.motd.beans.MailSessionBean;
[...]

public class AccountReset {

  [...]
  @Inject
  private MailSessionBean mailBean;

  [...]

  Object onSuccess() {
	mailBean.sendEmail("i...@ae-online.de", "TestMail - Java Mail Session", 
"TestMail - Java Mail Session - Body\n\n(c) 2018 AE Online");

  }

  [...]
}


mail:~ # asadmin list-javamail-resources
Enter admin user name>
Enter admin password>
mail/Session
mailSession
mail/motdSession
Command list-javamail-resources executed successfully.

--
ae | Andreas Ernst | IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
a...@ae-online.de | www.ae-online.de
www.tachyon-online.de

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



mail-resource Mail session

2018-09-09 Thread Andreas Ernst

Hi,

i try to access a Payara Mailsession (mail-resource), but it is always null:

@Stateless
public class MailSessionBean {

  private static final Logger logger = 
Logger.getLogger(MailSessionBean.class.getName());

  @Resource(name = "mail/motdSession")
  private Session mailSession;

  public void sendEmail(String to, String subject, String body) {
MimeMessage message = new MimeMessage(mailSession);
logger.log(Level.INFO, "### mailSession.sendEmail: {0}", mailSession);

mailSession is null. I added the class to AppModule:

public static void bind(ServiceBinder binder) {
  binder.bind(MailSessionBean.class);

but nothing helped, anybody how has this running. Google doesn't really 
help.


Thanks
Andy
--
ae | Andreas Ernst | IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
a...@ae-online.de | www.ae-online.de
www.tachyon-online.de

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



web.xml

2017-09-06 Thread Andreas Ernst

Hi,

can we change in the Maven repo for quickstart the web.xml to:

http://java.sun.com/xml/ns/javaee";
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
 xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd";

 version="3.0">

Regards
Andreas
--
ae | Andreas Ernst | IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
a...@ae-online.de | www.ae-online.de
www.tachyon-online.de

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Cannot use an EntityTransaction while using JTA

2016-09-08 Thread Andreas Ernst

Hi,

Am 01.04.16 um 16:30 schrieb Andreas Ernst:

Hi,

i work with the new Payara 4.1.1.161.1, since version 4.1.1.161. They
changed to EclipseLink 2.6.2 (Patched to payara-p1).

Maybe someone is also using the GlassFish Clone.

I was searching several time, what causes this error.

  @CommitAfter
  @PersistenceContext(unitName = "")
  Object onSuccess() {
  }

Payara 4.1.1.154 works fine with this code. I am still investigating
this issue.

Maybe someone has also this issue.

I am not sure is this an Payara, Tapesty or EclipseLink issue.


so, it is clear, that this is an issue of EclipseLink and Tapestry.

Eclipselink is throwing an error for that issue after the 2.6.1 
releases. I use persistence units with transaction-type="JTA".


This worked until Eclipselink 2.6.1. Is there a chance to support JTA 
transaction in Tapestry?


Here is the link for this issue with Payara:

https://github.com/payara/Payara/issues/736

Regards
Andreas
--
ae | Andreas Ernst | IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
a...@ae-online.de | www.ae-online.de
www.tachyon-online.de

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Cannot use an EntityTransaction while using JTA

2016-04-01 Thread Andreas Ernst

Hi,

i work with the new Payara 4.1.1.161.1, since version 4.1.1.161. They 
changed to EclipseLink 2.6.2 (Patched to payara-p1).


Maybe someone is also using the GlassFish Clone.

I was searching several time, what causes this error.

  @CommitAfter
  @PersistenceContext(unitName = "")
  Object onSuccess() {
  }

Payara 4.1.1.154 works fine with this code. I am still investigating 
this issue.


Maybe someone has also this issue.

I am not sure is this an Payara, Tapesty or EclipseLink issue.

Regards
Andreas
--
ae | Andreas Ernst | IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
a...@ae-online.de | www.ae-online.de
www.tachyon-online.de

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: No service implements the interface java.util.Date.

2016-01-05 Thread Andreas Ernst

Am 05.01.16 um 14:14 schrieb Thiago H de Paula Figueiredo:

On Tue, 05 Jan 2016 09:03:59 -0200, Andreas Ernst  wrote:


Hi,


Hi!

"No service implements the interface XXX" means you're trying to inject
a dependency of type XXX in some service or object created by
ObjectLocator/Registry.autobuild(). The class you're editing in
BeanEditForm, Tanken, probably has constructors other than a no-arg one
and you're leaving the instantiation of Tanken to
BeanEditForm/BeanEditor, which does that by calling
ObjectLocator.autobuild(), which takes the constructor with the longest
list of parameters then considers them as dependencies (services) to
inject.

Here's my proposed fix: instantiate the object yourself in your page:

void onPrepare() {
 if (tanken == null) {
 tanken = new Tanken();
 }
}

The 'prepare' event is triggered just before a Form is rendered
(BeanEditForm uses this component internally) and also just before a
form submission is handled, triggering the 'validate', 'success' and
'failure' events as needed.



You saved my day. I think, i never would find to change setupRender to 
onPrepare. The other T5 project got onPrepare ...


Thanks a lot!

--
ae | Andreas Ernst | IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
a...@ae-online.de | www.ae-online.de
www.tachyon-online.de

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



No service implements the interface java.util.Date.

2016-01-05 Thread Andreas Ernst
ase the id fields 
are not set

if (!(object instanceof Tanken)) {
  return false;
}
Tanken other = (Tanken) object;
if ((this.datzeit == null && other.datzeit != null) || 
(this.datzeit != null && !this.datzeit.equals(other.datzeit))) {

  return false;
}
return true;
  }

  @Override
  public String toString() {
return "de.aeits.erda.ccis.mariadb.Tanken[ datzeit=" + datzeit + " ]";
  }
}


Do i need a ValueEncoder Class for the timestamp?

Thanks
Andy
--
ae | Andreas Ernst | IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
a...@ae-online.de | www.ae-online.de
www.tachyon-online.de

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



HTTPS + tapestry-security

2015-12-06 Thread Andreas Ernst

Hi,

i got an Apache in Front how redirects http to https pages.

This works fine if i use

configuration.add(SymbolConstants.PRODUCTION_MODE, false);

If i change this to true, URI does not add the '/' at the end of the 
host, i.e. domain.tldlogin/unauthenticated. And the login form does not 
use action="/login.login", it uses http:/...


tapestry 5.4-rc-1
tapestry-security 0.6.2

Bug?

Andy
--
ae | Andreas Ernst | IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
a...@ae-online.de | www.ae-online.de
www.tachyon-online.de

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Unable to locate a single EntityManager. You must provide the persistence unit name as defined in the persistence.xml using the @PersistenceContext annotation.

2015-03-18 Thread Andreas Ernst

Hi Felix,

yes, you are right i use two persitence units. And it works now.

Thanks!
Andreas

Am 18.03.15 um 05:23 schrieb Felix Scheffer:

Hi Andreas,

I assume you have more than one persistence context. In this case you have
to add the @PersistenceContext annotation to your onSuccess() method.
Otherwise the system doesn't  know which persistence context it should use.

(The related code is in JpaInternalUtils.getEntityManager() and
in EntityManagerManagerImpl)

Hope that helps.

Felix

2015-03-17 11:16 GMT+01:00 Andreas Ernst :


Hi,

i got a ejb with two entities.

All is working fine, but if i persist the entity, it got this error:

Unable to locate a single EntityManager. You must provide the persistence
unit name as defined in the persistence.xml using the @PersistenceContext
annotation.


   @Inject
   @PersistenceContext(unitName = "de.aeits_ERDA-CCIS-EJB_ejb_1.01PU")
   private EntityManager entityManager;

   @Log
   @CommitAfter
   Object onSuccess() {
 logger.log(Level.INFO, "erfolgreicher Login von {0}", user);
 try {
   Users users = entityManager.find(Users.class, user);
   logger.log(Level.INFO, "User {0}", user);
   users.setIp(requestGlobal.getHTTPServletRequest().getRemoteAddr());
//  entityManager.getTransaction().begin();
   entityManager.merge(users);
//  entityManager.getTransaction().commit();
 } catch (Exception e) {
   logger.log(Level.INFO, "Es ist ein Fehler aufgetreten: {0}", e);
 }
 return Index.class;
   }


If i remove the annotation @CommitAfter and do it with
entityManager.getTransaction().begin() and 
entityManager.getTransaction().commit(),
it works.

Any hints?

TIA
Andreas
--
ae | Andreas Ernst | IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
a...@ae-online.de | www.ae-online.de
www.tachyon-online.de

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org






--
ae | Andreas Ernst | IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
a...@ae-online.de | www.ae-online.de
www.tachyon-online.de

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Unable to locate a single EntityManager. You must provide the persistence unit name as defined in the persistence.xml using the @PersistenceContext annotation.

2015-03-17 Thread Andreas Ernst

Hi,

i got a ejb with two entities.

All is working fine, but if i persist the entity, it got this error:

Unable to locate a single EntityManager. You must provide the 
persistence unit name as defined in the persistence.xml using the 
@PersistenceContext annotation.



  @Inject
  @PersistenceContext(unitName = "de.aeits_ERDA-CCIS-EJB_ejb_1.01PU")
  private EntityManager entityManager;

  @Log
  @CommitAfter
  Object onSuccess() {
logger.log(Level.INFO, "erfolgreicher Login von {0}", user);
try {
  Users users = entityManager.find(Users.class, user);
  logger.log(Level.INFO, "User {0}", user);
  users.setIp(requestGlobal.getHTTPServletRequest().getRemoteAddr());
//  entityManager.getTransaction().begin();
  entityManager.merge(users);
//  entityManager.getTransaction().commit();
} catch (Exception e) {
  logger.log(Level.INFO, "Es ist ein Fehler aufgetreten: {0}", e);
}
return Index.class;
  }


If i remove the annotation @CommitAfter and do it with 
entityManager.getTransaction().begin() and 
entityManager.getTransaction().commit(), it works.


Any hints?

TIA
Andreas
--
ae | Andreas Ernst | IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
a...@ae-online.de | www.ae-online.de
www.tachyon-online.de

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: [ANNOUNCEMENT] Project Arras

2014-11-14 Thread Andreas Ernst

Am 14.11.14 um 17:43 schrieb Charlouze:

Is it possible to have admin login and password for the cms demo ?

2014-11-14 17:28 GMT+01:00 Felix Scheffer :


Demo for arras-components:
https://arras-components.herokuapp.com/

Demo for arras-cms (should reset every 24h)
http://arras-cms.herokuapp.com/


Just click login.

--
ae | Andreas Ernst | IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
a...@ae-online.de | www.ae-online.de
www.tachyon-online.de

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Stacktrace when on Tomcat server

2014-11-14 Thread Andreas Ernst

Am 14.11.14 um 13:44 schrieb Nathan Quirynen:

Maybe this helps... it's not much more than what I originally sent, but
there is no more...
This is all I see in the tomcat logs:

[ERROR] ioc.Registry java.lang.ArrayIndexOutOfBoundsException
[ERROR] ioc.Registry Operations trace:
[ERROR] ioc.Registry [ 1] Constructing instance of page class
com.example.pages.Index
[ERROR] ioc.Registry [ 2] Creating ComponentAssembler for
com.example.pages.Index
[ERROR] ioc.Registry [ 3] Parsing component template
classpath:com/example/pages/Index.tml


Show your Index.tml

--
ae | Andreas Ernst | IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
a...@ae-online.de | www.ae-online.de
www.tachyon-online.de

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: persistence units

2014-10-31 Thread Andreas Ernst

Am 31.10.14 um 21:12 schrieb Andreas Ernst:

Hi,

thanks for the answers, i tried both, but i did not helped. Which
persistence version you are using?


Sorry, i forgot i use 5.4-beta-22.

--
ae | Andreas Ernst | IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
a...@ae-online.de | www.ae-online.de
www.tachyon-online.de

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: persistence units

2014-10-31 Thread Andreas Ernst
 .cast(getOrCreateProxy(annotationProvider, locator));

return null;
}

private synchronized EntityManager getOrCreateProxy(
final AnnotationProvider annotationProvider,
final ObjectLocator objectLocator) {
final PlasticProxyFactory proxyFactory = objectLocator.getService(
"PlasticProxyFactory", PlasticProxyFactory.class);

final PersistenceContext annotation = annotationProvider
.getAnnotation(PersistenceContext.class);

EntityManager proxy = proxyFactory.createProxy(EntityManager.class,
new ObjectCreator() {
public EntityManager createObject() {
final EntityManagerManager entityManagerManager = objectLocator
.getService(EntityManagerManager.class);

return JpaInternalUtils.getEntityManager(
entityManagerManager, annotation);
}
}, "");

return proxy;
}



--
ae | Andreas Ernst | IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
a...@ae-online.de | www.ae-online.de
www.tachyon-online.de

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



persistence units

2014-10-29 Thread Andreas Ernst
 
com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167)
	at 
org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:201)
	at 
org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:175)
	at 
org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)
	at 
org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
	at 
org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
	at 
org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
	at 
org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
	at 
org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
	at 
org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
	at 
org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:561)
	at 
org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
	at 
org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
	at 
org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
	at 
org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
	at 
org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565)
	at 
org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)

at java.lang.Thread.run(Thread.java:745)


It is possible to use two persistence units?

TIA
Andreas
--
ae | Andreas Ernst | IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
a...@ae-online.de | www.ae-online.de
www.tachyon-online.de

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Update from 5.4-beta-6 to beta-22 - IOUtils ClassNotFound

2014-09-28 Thread Andreas Ernst

Am 28.09.14 um 03:54 schrieb Chris Mylonas:


Are you using persitence?


Yes in EJB, eclipse link.

I spent some hours porting a bash scripts code generator to nodejs
yesterday and nearly finished but won't get to it again for today.

I'll be able to do more accurate troubleshooting on this issue then, using
standalone tapestry-hibernate and separate ejb.jar/war/ear to see if its
chris or tapestry errors.


I ran into the same error. You only can use one persistence-unit.

--
ae | Andreas Ernst | IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
a...@ae-online.de | www.ae-online.de
www.tachyon-online.de

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Update from 5.4-beta-6 to beta-22 - IOUtils ClassNotFound

2014-09-27 Thread Andreas Ernst

Am 25.09.14 um 04:54 schrieb Chris Mylonas:

Hi T54Beta People,

As subject says, updated my pom got an error on deployment.
Changing back to beta-6, error goes away.

Google and some 54 release notes don't mention IOUtils or commons that
I've found.

mvn clean install
Deploy to glassfish 3.1.2.2


Are you using persitence?

--
ae | Andreas Ernst | IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
a...@ae-online.de | www.ae-online.de
www.tachyon-online.de

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Java 8 with Tapestry 5.3.x?

2014-08-05 Thread Andreas Ernst

Am 05.08.14 21:19, schrieb Richard Frovarp:

Is there an easy way to get Tapestry 5.3.7 to work with Java 8? Or is
there a plan to release 5.3.8 that would be Java 8 compatible? The big
reason I'm asking is that Java 7 goes EOL next April. I would love to
start moving our applications over to libraries that support Java 8
starting now so hopefully we can be off of Java 7 when it goes EOL.


I use

tux:~ # java -version
java version "1.8.0_11"
Java(TM) SE Runtime Environment (build 1.8.0_11-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.11-b03, mixed mode)

Opensuse 13.1, with GF 4 and T 5.4-beta-15

--
ae | Andreas Ernst | IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
a...@ae-online.de | www.ae-online.de
www.tachyon-online.de

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



There is no data to display.

2014-03-20 Thread Andreas Ernst

Hi,

i still got this issue - some times.

I the source Grid.java i found CachingDataSource. Is there any chance to 
set this off.


HIA
Andreas
--
ae | Andreas Ernst | IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
a...@ae-online.de | www.ae-online.de
www.tachyon-online.de

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: GIT

2014-03-19 Thread Andreas Ernst

Am 19.03.14 12:33, schrieb Dragan Sahpaski:

Fine here.
http://www.downforeveryoneorjustme.com/git-wip-us.apache.org/repos/asf?p=tapestry-5.git

there is also a mirror on github https://github.com/apache/tapestry-5

Cheers,
Dragan Sahpaski


On Wed, Mar 19, 2014 at 12:29 PM, Andreas Ernst  wrote:


http://git-wip-us.apache.org/repos/asf/tapestry-5.git: 302 Found

Any other URL?


I tired the Committers URL: 
https://git-wip-us.apache.org/repos/asf/tapestry-5.git and it worked.


Thanks.

--
ae | Andreas Ernst | IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
a...@ae-online.de | www.ae-online.de
www.tachyon-online.de

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



GIT

2014-03-19 Thread Andreas Ernst

http://git-wip-us.apache.org/repos/asf/tapestry-5.git: 302 Found

Any other URL?

--
ae | Andreas Ernst | IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
a...@ae-online.de | www.ae-online.de
www.tachyon-online.de

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Reg: Grid DataSources

2014-03-17 Thread Andreas Ernst

Am 18.03.14 05:39, schrieb srikaanth:

Hi all,

Am working on a tapestry project. Am using grid to show table using
hibernate. I was able to show single table structure . But here i need
to join two table and show it in single table . Am using tapestry 5.3.
Is there any way to do or any addon avaliable or i need to created a new
structure on my own.


The easiest way is to create a entity class from a sql view. Or you can 
try this:


http://wiki.apache.org/tapestry/Tapestry5HowtoSelectWithObjects

--
ae | Andreas Ernst | IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
a...@ae-online.de | www.ae-online.de
www.tachyon-online.de

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: [Jumpstart] Glassfish 4, EJB Provider not detected

2013-12-20 Thread Andreas Ernst

Hi,

Am 20.12.13 03:11, schrieb Chris Mylonas:

Hi All,

Just a heads up.

I've just tested deploying an EAR with glassfish 4 because I thought I'd
try a JPA-2.1 sql inject on load setting available through the
persistence.xml that would be handy for my current dev project.


JPA 2.1 is not working, you must use version 1.

https://issues.apache.org/jira/browse/TAP5-2206

--
ae | Andreas Ernst | IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
a...@ae-online.de | www.ae-online.de
www.tachyon-online.de

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: [5.4a25] There is no data to display.

2013-11-14 Thread Andreas Ernst

Am 14.11.13 14:22, schrieb Andreas Ernst:

Am 14.11.13 12:06, schrieb Thiago H de Paula Figueiredo:

On Thu, 14 Nov 2013 08:40:21 -0200, Andreas Ernst 
wrote:


Hi,


Hi!


i got a strange issue with the table grid. Sometimes i get the
message: 'There is no data to display.'


This will happen if the source parameter provides zero objects to be
shown.



I know, but only the grid source is null. The database has datas.


To make it more clear:

@Log
void setupRender() {
  List produkte = 
entityManager.createNamedQuery("Tachyon.findAllByStatusTrue").getResultList();

  System.out.println("Count Products: " + produkte.size());
}

##

Information:   [DEBUG] pages.Tachyonprodukte [ENTER] setupRender()
Information:   [EL Finer]: connection: 2013-11-14 
14:56:52.084--ServerSession(2097590289)--Thread(Thread[http-listener-1(2),5,main])--client 
acquired: 41491008
Information:   [EL Finer]: transaction: 2013-11-14 
14:56:52.084--ClientSession(41491008)--Thread(Thread[http-listener-1(2),5,main])--acquire 
unit of work: 1554669828
Information:   [EL Finest]: query: 2013-11-14 
14:56:52.084--UnitOfWork(1554669828)--Thread(Thread[http-listener-1(2),5,main])--Execute 
query ReadAllQuery(name="Tachyon.findAllByStatusTrue" 
referenceClass=Tachyon sql="SELECT ARTNR, ARTIKEL, ATT_ARTIKEL, 
ATT_VARIANTE, BESTAND, ID, ID_GRUPPE, SHOP, STATUS, URL FROM TACHYON 
WHERE (STATUS = 1)")
Information:   [EL Finest]: connection: 2013-11-14 
14:56:52.084--ServerSession(2097590289)--Connection(473512611)--Thread(Thread[http-listener-1(2),5,main])--Connection 
acquired from connection pool [default].
Information:   [EL Fine]: sql: 2013-11-14 
14:56:52.084--ServerSession(2097590289)--Connection(473512611)--Thread(Thread[http-listener-1(2),5,main])--SELECT 
ARTNR, ARTIKEL, ATT_ARTIKEL, ATT_VARIANTE, BESTAND, ID, ID_GRUPPE, SHOP, 
STATUS, URL FROM TACHYON WHERE (STATUS = 1)
Information:   [EL Finest]: connection: 2013-11-14 
14:56:52.106--ServerSession(2097590289)--Connection(473512611)--Thread(Thread[http-listener-1(2),5,main])--Connection 
released to connection pool [default].

Information:   Count Products: 406
Information:   [DEBUG] pages.Tachyonprodukte [ EXIT] setupRender

##

As you can see, the table has 'Count Products: 406' rows, but there is 
no call of getTachyonenprodukte.


That is the issue, sometimes the method is called sometimes not.

--
ae | Andreas Ernst | IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
a...@ae-online.de | www.ae-online.de
www.tachyon-online.de

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: [5.4a25] There is no data to display.

2013-11-14 Thread Andreas Ernst

Am 14.11.13 12:06, schrieb Thiago H de Paula Figueiredo:

On Thu, 14 Nov 2013 08:40:21 -0200, Andreas Ernst  wrote:


Hi,


Hi!


i got a strange issue with the table grid. Sometimes i get the
message: 'There is no data to display.'


This will happen if the source parameter provides zero objects to be shown.



I know, but only the grid source is null. The database has datas.

No datas displayed:

Information:   [DEBUG] pages.Tachyonprodukte [ENTER] setupRender()
Information:   TachyonProdukte - setupRender
Information:   [DEBUG] pages.Tachyonprodukte [ EXIT] setupRender

Datas displayed:

Information:   [INFO] InternalModule.PageLoader Loaded page 
'Tachyonprodukte' (de) in 981,123 ms

Information:   [DEBUG] pages.Tachyonprodukte [ENTER] setupRender()
Information:   TachyonProdukte - setupRender
Information:   [DEBUG] pages.Tachyonprodukte [ EXIT] setupRender
Information:   [DEBUG] pages.Tachyonprodukte [ENTER] getTachyonenprodukte()
Information:   [DEBUG] pages.Tachyonprodukte [ EXIT] 
getTachyonenprodukte [[de.aeits.extranet.entities.Tachyon[ artnr=AEPS-B1 
], de.aeits.extranet.entities.Tachyon[ artnr=AEPS-B3 ], 
de.aeits.extranet.entities.Tachyon[ artnr=AEPS-B4 ], [ more table 
datas ]]

Information:   [INFO] AppModule.TimingFilter Request time: 2614 ms
Information:   [EL Finer]: transaction: 2013-11-14 
11:18:59.633--UnitOfWork(1790387230)--Thread(Thread[http-listener-1(4),5,main])--release 
unit of work
Information:   [EL Finer]: connection: 2013-11-14 
11:18:59.633--ClientSession(1142255716)--Thread(Thread[http-listener-1(4),5,main])--client 
released

Information:   [INFO] AppModule.TimingFilter Request time: 10 ms

When no datas are displayed the method getTachyonenprodukte() is not called.

--
ae | Andreas Ernst | IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
a...@ae-online.de | www.ae-online.de
www.tachyon-online.de

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



[5.4a25] There is no data to display.

2013-11-14 Thread Andreas Ernst

Hi,

i got a strange issue with the table grid. Sometimes i get the message: 
'There is no data to display.'


Information:   [DEBUG] pages.Tachyonprodukte [ENTER] setupRender()
Information:   TachyonProdukte - setupRender
Information:   [DEBUG] pages.Tachyonprodukte [ EXIT] setupRender


http://tapestry.apache.org/schema/tapestry_5_3.xsd";
  xmlns:p="tapestry:parameter">

  rowsPerPage="50" t:model="model">


  
 €
  


  
format="summeFormat1"/> St.

  

  


public class Tachyonprodukte {

  @PersistenceContext(unitName = "de.aeits.extranet.PU")
  private EntityManager entityManager;

  @Property
  Tachyon tachyonenprodukte;

  @Property
  Tachyon tachyonprodukt;

  @Inject
  private BeanModelSource beanModelSource;
  @Inject
  private Messages messages;

  @Log
  public List getTachyonenprodukte() {
return 
entityManager.createNamedQuery("Tachyon.findAllByStatusTrue").getResultList();

  }

  public BeanModel getModel() {
BeanModel model = 
beanModelSource.createEditModel(Tachyon.class, messages);

model.add("action", null);
model.include("artnr", "artikel", "shop", "bestand");
model.get("artnr").label("ArtNr");
model.get("shop").label("Vk-Preis");
return model;
  }

  public Format getSummeFormat() {
return new DecimalFormat("#,##0.00");
  }

  public Format getSummeFormat1() {
return new DecimalFormat("0");
  }

  @Log
  void setupRender() {
System.out.println("TachyonProdukte - setupRender");
  }
}

After some change to the TML, save the file, and remove the changes, 
save again, i got the datas.


Information:   [INFO] InternalModule.PageLoader Loaded page 
'Tachyonprodukte' (de) in 981,123 ms

Information:   [DEBUG] pages.Tachyonprodukte [ENTER] setupRender()
Information:   TachyonProdukte - setupRender
Information:   [DEBUG] pages.Tachyonprodukte [ EXIT] setupRender
Information:   [DEBUG] pages.Tachyonprodukte [ENTER] getTachyonenprodukte()
Information:   [EL Finer]: connection: 2013-11-14 
11:18:59.064--ServerSession(873092013)--Thread(Thread[http-listener-1(4),5,main])--client 
acquired: 1142255716
Information:   [EL Finer]: transaction: 2013-11-14 
11:18:59.064--ClientSession(1142255716)--Thread(Thread[http-listener-1(4),5,main])--acquire 
unit of work: 1790387230
Information:   [EL Finest]: query: 2013-11-14 
11:18:59.064--UnitOfWork(1790387230)--Thread(Thread[http-listener-1(4),5,main])--Execute 
query ReadAllQuery(name="Tachyon.findAllByStatusTrue" 
referenceClass=Tachyon sql="SELECT ARTNR, ARTIKEL, ATT_ARTIKEL, 
ATT_VARIANTE, BESTAND, ID, ID_GRUPPE, SHOP, STATUS, URL FROM TACHYON 
WHERE (STATUS = 1)")
Information:   [EL Finest]: connection: 2013-11-14 
11:18:59.065--ServerSession(873092013)--Connection(2110785883)--Thread(Thread[http-listener-1(4),5,main])--Connection 
acquired from connection pool [default].
Information:   [EL Fine]: sql: 2013-11-14 
11:18:59.065--ServerSession(873092013)--Connection(2110785883)--Thread(Thread[http-listener-1(4),5,main])--SELECT 
ARTNR, ARTIKEL, ATT_ARTIKEL, ATT_VARIANTE, BESTAND, ID, ID_GRUPPE, SHOP, 
STATUS, URL FROM TACHYON WHERE (STATUS = 1)
Information:   [EL Finest]: connection: 2013-11-14 
11:18:59.081--ServerSession(873092013)--Connection(2110785883)--Thread(Thread[http-listener-1(4),5,main])--Connection 
released to connection pool [default].
Information:   [DEBUG] pages.Tachyonprodukte [ EXIT] 
getTachyonenprodukte [[de.aeits.extranet.entities.Tachyon[ artnr=AEPS-B1 
], de.aeits.extranet.entities.Tachyon[ artnr=AEPS-B3 ], 
de.aeits.extranet.entities.Tachyon[ artnr=AEPS-B4 ], [ more table 
datas ]]

Information:   [INFO] AppModule.TimingFilter Request time: 2614 ms
Information:   [EL Finer]: transaction: 2013-11-14 
11:18:59.633--UnitOfWork(1790387230)--Thread(Thread[http-listener-1(4),5,main])--release 
unit of work
Information:   [EL Finer]: connection: 2013-11-14 
11:18:59.633--ClientSession(1142255716)--Thread(Thread[http-listener-1(4),5,main])--client 
released

Information:   [INFO] AppModule.TimingFilter Request time: 10 ms

Related databases MySQL and MaxDB, AppServers GlassFish 3.x and 4.

The very strange is, that i got two other pages without this issue.

Any ideas?
Andreas
--
ae | Andreas Ernst | IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
a...@ae-online.de | www.ae-online.de
www.tachyon-online.de

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Tapestry 5.4 demo

2013-11-01 Thread Andreas Ernst

Am 01.11.13 18:20, schrieb Boris Horvat:

Well the problem is not in the tapestry-jquery as I still have the same
issue after removing it


Do a clean rebuild.

--
ae | Andreas Ernst | IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
a...@ae-online.de | www.ae-online.de
www.tachyon-online.de

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Tapestry 5.4 demo

2013-11-01 Thread Andreas Ernst

Am 01.11.13 16:55, schrieb Boris Horvat:

Excluding dependency from tynamo security cased a new problem :)


java.lang.NoSuchMethodError:
org.apache.tapestry5.services.javascript.JavaScriptSupport.importStylesheet(Lorg/apache/tapestry5/Asset;)V
at
org.got5.tapestry5.jquery.services.ImportJQueryUIWorker$2.advise(ImportJQueryUIWorker.java:92)
at
org.apache.tapestry5.internal.plastic.AbstractMethodInvocation.proceed(AbstractMethodInvocation.java:86)
at
org.apache.tapestry5.corelib.pages.ExceptionReport.setupRender(ExceptionReport.java)
at
org.apache.tapestry5.internal.structure.ComponentPageElementImpl$SetupRenderPhase.invokeComponent(ComponentPageElementImpl.java:179)
at
org.apache.tapestry5.internal.structure.ComponentPageElementImpl$AbstractPhase.invoke(ComponentPageElementImpl.java:138)
at
org.apache.tapestry5.internal.structure.ComponentPageElementImpl$SetupRenderPhase.render(ComponentPageElementImpl.java:186)
at
org.apache.tapestry5.internal.services.RenderQueueImpl.run(RenderQueueImpl.java:73)
at
org.apache.tapestry5.internal.services.PageRenderQueueImpl.render(PageRenderQueueImpl.java:124)



This error is with 5.4-alpha-23 and tapestry-jquery.

--
ae | Andreas Ernst | IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
a...@ae-online.de | www.ae-online.de
www.tachyon-online.de

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: grid if eventlink

2013-10-28 Thread Andreas Ernst

Hi Nathan,

Am 28.10.13 11:07, schrieb Nathan Quirynen:

Hi,

the If component doesn't have a parameter "context". What you need to do
is the following:

1) set parameter "row" in your grid component (which you probably
already did with property "bestellung"):

 

 @Property
 private Bestellung bestellung;


This did not work: Unable to create new accessor method public 
java.lang.Boolean getGebucht() on class 
de.aeits.extranet.pages.Bestellungen as the method is already implemented.


So, just do it by hand:

  public Boolean getGebucht() {
return tachyonbestellung.getStatus().equals(100);
  }
  public void setGebucht (Boolean bool) {
  }



2) create a property in your page class:

 public boolean isGebucht() {
 return bestellung.getBestNr().equals(100);
 }

3) Use the if component like this:

 
 
 buchen
 
 


I hope this is what you were asking for.


Yes, i did.

Thanks.
Andreas
--
ae | Andreas Ernst | IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
a...@ae-online.de | www.ae-online.de
www.tachyon-online.de

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



grid if eventlink

2013-10-27 Thread Andreas Ernst

Hi,

i got a grid from a database. Now i want that the eventlink is only 
shown if the status is 100. i.e.



  
t:context="tachyonbestellung.bestnr">buchen

  


At the moment i do not see an easy way to do that.

Any hints?

Andreas
--
ae | Andreas Ernst | IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
a...@ae-online.de | www.ae-online.de
www.tachyon-online.de

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



[5.4-alpha-23] Memory Leak on GlassFish 4.0.1-b03

2013-10-25 Thread Andreas Ernst

Hi,

The web application [/AEOnlineExtranet] created a ThreadLocal with key 
of type 
[org.apache.tapestry5.ioc.internal.services.PerthreadManagerImpl.MapHolder] 
(value 
[org.apache.tapestry5.ioc.internal.services.PerthreadManagerImpl$MapHolder@1ddcda0d]) 
and a value of type [java.util.HashMap] (value [{1=DEFINED, 2=DEFINED, 
3=DEFINED, 4=DEFINED, 5=DEFINED, 6=DEFINED, 7=DEFINED, 8=DEFINED, 
9=DEFINED, 10=DEFINED, 11=DEFINED}]) but failed to remove it when the 
web application was stopped. Threads are going to be renewed over time 
to try and avoid a probable memory leak.]]


After some deploys GlassFish dies.

It seems to be this bug:

https://issues.apache.org/jira/browse/TAP5-1983

Should i file a bug report?

Andreas
--
ae | Andreas Ernst | IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
a...@ae-online.de | www.ae-online.de
www.tachyon-online.de

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: JPA

2013-10-18 Thread Andreas Ernst

Am 11.10.13 15:34, schrieb Dmitry Gusev:

It's hard to say, sorry, should be something simple. You may attach with
debugger and see.
We can continue this discussion on the #tapestry IRC channel on
irc.freenode.net if you want... just to stop spamming this ML.


Thanks to Dmitry Gusev!

https://issues.apache.org/jira/browse/TAP5-2206

--
ae | Andreas Ernst | IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
a...@ae-online.de | www.ae-online.de
www.tachyon-online.de

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: JPA

2013-10-11 Thread Andreas Ernst

Am 11.10.13 17:57, schrieb Lenny Primak:

The issue you are facing boils down to this:

EntityManager(s) (EM) in JPA can be created multiple ways.

Tapestry-JPA manages / creates it's own EntityManagerFactory (EMF)  and EMs
It also reads persistence.xml on its own, and follows its own rules as far as 
having to have entities in a specific package (i.e. xxx.xxx.entities)
When you use @PersistenceContext in Tapestry context, you are actually using 
the infrastructure (EMF and EMs) managed by Tapestry-JPA.

Glassfish and the EJB container manage EMFs and EMs on their own, in a 
different, completely disconnected way.


But with Tomcat i got the same issue.


If you are using both, you will have two JPA caches and two instances of JPA 
infrastructure.
When you do this: factory = 
Persistence.createEntityManagerFactory("de.aeits_TapestryWeb_war_1.0-SNAPSHOTPU");

entityManager = factory.createEntityManager();

you are creating EMF by yourself and that will read persistence.xml yet again, 
completely disconnected from Tapestry or the EJB container.

Tapestry-JPA is a tricky beast to use when you have more than one PU defined in 
your persistence.xml.
It works fine if you define all your classes manually in persistence.xml, but 
in case of auto-scanning for entities,
it's hard to get that working correctly (manual configuration / scanning is 
required)

In my own projects, I wound up not using tapestry-JPA at all.  I just call EJBs 
using FlowLogix library
and let EJBs do all my database handling.
I did create a bit of infrastructure (1500 lines of code or so)
that includes GenericDAO, and GridDataSource that call EJBs to get their data 
generically.
It's not public now, but if need be I can make it so.


I just take a look at FlowLogix, i there any documentation for that?

I am interested in that, because i will Tapestry use with databases.

Thanks @all.

--
ae | Andreas Ernst | IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
a...@ae-online.de | www.ae-online.de
www.tachyon-online.de

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: JPA

2013-10-11 Thread Andreas Ernst

Am 11.10.13 14:52, schrieb Dmitry Gusev:

What is the name and location of your persistence.xml file?

Is it src/main/resources/META-INF/persistence.xml ?


Yes, it is:

/Users/andreas/Documents/NetBeansProjects/TapestryWeb/src/main/resources/META-INF/persistence.xml

And deployed under: 
/Users/andreas/Documents/NetBeansProjects/TapestryWeb/target/TapestryWeb/WEB-INF/classes/META-INF/persistence.xml




It looks like it can't find any PUs with the given name in your
configuration:

https://github.com/apache/tapestry-5/blob/master/tapestry-jpa/src/main/java/org/apache/tapestry5/internal/jpa/EntityManagerSourceImpl.java#L212-L214


Hhmm, but why is this working?

  public List getCustomers() {
factory = 
Persistence.createEntityManagerFactory("de.aeits_TapestryWeb_war_1.0-SNAPSHOTPU");

entityManager = factory.createEntityManager();
return 
entityManager.createNamedQuery("Customer.findAll").getResultList();

  }

Here the PU is found. I checked it just with Tomcat 7, the same error.

--
ae | Andreas Ernst | IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
a...@ae-online.de | www.ae-online.de
www.tachyon-online.de

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: JPA

2013-10-11 Thread Andreas Ernst
actory for persistence unit 
'de.aeits_TapestryWeb_war_1.0-SNAPSHOTPU'
	at 
org.apache.tapestry5.internal.jpa.EntityManagerSourceImpl.createEntityManagerFactory(EntityManagerSourceImpl.java:212)
	at 
org.apache.tapestry5.internal.jpa.EntityManagerSourceImpl.getEntityManagerFactory(EntityManagerSourceImpl.java:185)
	at 
org.apache.tapestry5.internal.jpa.EntityManagerSourceImpl.create(EntityManagerSourceImpl.java:276)

at $EntityManagerSource_132c0c615bb9bda5.create(Unknown Source)
	at 
org.apache.tapestry5.internal.jpa.EntityManagerManagerImpl.getOrCreateEntityManager(EntityManagerManagerImpl.java:78)
	at 
org.apache.tapestry5.internal.jpa.EntityManagerManagerImpl.getEntityManager(EntityManagerManagerImpl.java:51)

at $EntityManagerManager_132c0c615bb9bda4.getEntityManager(Unknown 
Source)
at $EntityManagerManager_132c0c615bb9bda3.getEntityManager(Unknown 
Source)
	at 
org.apache.tapestry5.internal.jpa.JpaInternalUtils.getEntityManager(JpaInternalUtils.java:85)
	at 
org.apache.tapestry5.internal.jpa.PersistenceContextWorker$1.get(PersistenceContextWorker.java:50)
	at 
de.aeits.tapestryweb.pages.Customers.conduit_get_entityManager(Customers.java)
	at 
de.aeits.tapestryweb.pages.Customers.advised$getCustomers_132c0c615bb9bde5(Customers.java:34)
	at 
de.aeits.tapestryweb.pages.Customers$Invocation_getCustomers_132c0c615bb9bde4.proceedToAdvisedMethod(Unknown 
Source)
	at 
org.apache.tapestry5.internal.plastic.AbstractMethodInvocation.proceed(AbstractMethodInvocation.java:84)
	at 
org.apache.tapestry5.ioc.internal.services.LoggingAdvice.advise(LoggingAdvice.java:45)
	at 
org.apache.tapestry5.internal.plastic.AbstractMethodInvocation.proceed(AbstractMethodInvocation.java:86)

at de.aeits.tapestryweb.pages.Customers.getCustomers(Customers.java)
at $InternalPropertyConduit_132c0c615bb9be59.get(Unknown Source)
	at 
org.apache.tapestry5.internal.bindings.PropBinding.get(PropBinding.java:59)

... 95 more]]

--
ae | Andreas Ernst | IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
a...@ae-online.de | www.ae-online.de
www.tachyon-online.de

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: JPA

2013-10-11 Thread Andreas Ernst

Am 11.10.13 13:20, schrieb Dmitry Gusev:

Try removing @Inject and only keep @PersistenceContext for the
EntityManager field ? :)


Sure :)

public class Customers {

  @PersistenceContext(unitName = "de.aeits_TapestryWeb_war_1.0-SNAPSHOTPU")
  private EntityManager entityManager;

  @Log
  public List getCustomers() {
return 
entityManager.createNamedQuery("Customer.findAll").getResultList();

  }
}

java.lang.IllegalStateException: Failed to create EntityManagerFactory 
for persistence unit 'de.aeits_TapestryWeb_war_1.0-SNAPSHOTPU'
	at 
org.apache.tapestry5.internal.jpa.EntityManagerSourceImpl.createEntityManagerFactory(EntityManagerSourceImpl.java:212)
	at 
org.apache.tapestry5.internal.jpa.EntityManagerSourceImpl.getEntityManagerFactory(EntityManagerSourceImpl.java:185)
	at 
org.apache.tapestry5.internal.jpa.EntityManagerSourceImpl.create(EntityManagerSourceImpl.java:276)

at $EntityManagerSource_132c0b3869f9a87d.create(Unknown Source)


From my understanding of the docu, i only have to add the persistence 
class to the entities package, right?


Add the dependency to the pom:

  
org.apache.tapestry
tapestry-jpa
5.3.7


And just create a tml and the class like above.

--
ae | Andreas Ernst | IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
a...@ae-online.de | www.ae-online.de
www.tachyon-online.de

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: JPA

2013-10-11 Thread Andreas Ernst

Am 11.10.13 13:13, schrieb Eugen:

Hi, if You defined more persistence units in Your persistence.xml file
you should inject the EntityManager
  by
@Inject
@PersistenceContext(unitName = "unitname")


public class Customers {

  @Property
  private Customer customer;
  private EntityManagerFactory factory;
  @Inject
  @PersistenceContext(unitName = "de.aeits_TapestryWeb_war_1.0-SNAPSHOTPU")
  private EntityManager entityManager;

  @Log
  public List getCustomers() {
return 
entityManager.createNamedQuery("Customer.findAll").getResultList();

  }
}

org.apache.tapestry5.ioc.internal.OperationException: Field 
entityManager of class de.aeits.tapestryweb.pages.Customers can not be 
claimed by @javax.persistence.PersistenceContext as it is already 
claimed by @Inject.
	at 
org.apache.tapestry5.ioc.internal.OperationTrackerImpl.logAndRethrow(OperationTrackerImpl.java:121)
	at 
org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:88)
	at 
org.apache.tapestry5.ioc.internal.OperationTrackerImpl.run(OperationTrackerImpl.java:47)
	at 
org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.run(PerThreadOperationTracker.java:76)
	at 
org.apache.tapestry5.ioc.internal.RegistryImpl.run(RegistryImpl.java:1116)


--
ae | Andreas Ernst | IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
a...@ae-online.de | www.ae-online.de
www.tachyon-online.de

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: JPA

2013-10-11 Thread Andreas Ernst

Am 11.10.13 13:10, schrieb Dmitry Gusev:

Do you have more than one PU in persistence.xml?


Yes:


xmlns="http://xmlns.jcp.org/xml/ns/persistence"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence 
http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd";>
  transaction-type="RESOURCE_LOCAL">

org.eclipse.persistence.jpa.PersistenceProvider
de.aeits.tapestryweb.entities.DiscountCode
de.aeits.tapestryweb.entities.MicroMarket
de.aeits.tapestryweb.entities.Customer
false

  value="jdbc:derby://localhost:1527/sample"/>

  
  value="org.apache.derby.jdbc.ClientDriver"/>

  
  

  


--
ae | Andreas Ernst | IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
a...@ae-online.de | www.ae-online.de
www.tachyon-online.de

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: JPA

2013-10-11 Thread Andreas Ernst

Am 11.10.13 12:59, schrieb Lance Java:

http://lmgtfy.com/?q=tapestry+jpa&l=1

:)


lol, i read all docs i could find, even the pdf/book of Igor.

I work with NetBeans 7.3.1 and GlassFish 4.0.

--
ae | Andreas Ernst | IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
a...@ae-online.de | www.ae-online.de
www.tachyon-online.de

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: JPA

2013-10-11 Thread Andreas Ernst

Am 11.10.13 12:55, schrieb Dmitry Gusev:

Have you read this?
http://tapestry.apache.org/integrating-with-jpa.html

You should @Inject EntityManager, if you do things right you won't have to
create EntityManager instances yourself.

Also, saying that you have NPE, it would be nice if you provide us a
stacktrace.


On Fri, Oct 11, 2013 at 2:48 PM, Andreas Ernst  wrote:


Hi,

i am playing with JPA, but there is no useful information about that. A
simple example to display a database table.

The entities class is in the right package entities. I did not added
something to the AppModule class. The persistence.xml exists.

Customer.tml

http://tapestry.**apache.org/schema/tapestry_5_**3.xsd<http://tapestry.apache.org/schema/tapestry_5_3.xsd>
"
   xmlns:p="tapestry:parameter">
   



Customers.class

public class Customers {

   @Property
   private Customer customer;
   private EntityManagerFactory factory;
   private EntityManager entityManager;
   @Inject
   private Logger logger;
   @Inject
   private BeanModelSource beanModelSource;
   @Inject
   private Messages messages;

   @Log
   public List getCustomers() {
 factory = Persistence.**createEntityManagerFactory("**
de.aeits_TapestryWeb_war_1.0-**SNAPSHOTPU");
 entityManager = factory.createEntityManager();
 return entityManager.**createNamedQuery("Customer.**
findAll").getResultList();
   }
}


What about the DAO and DAOImpl there are no informations how to use this
classes with a simple query page.

In all docus i found only 
'entityManager.**createNamedQuery("Customer.**findAll").getResultList();'
is needed, but i get a null pointer expection.


Yes, i read that.

public class Customers {

  @Property
  private Customer customer;
  @Inject
  private EntityManager entityManager;

  public List getCustomers() {
return 
entityManager.createNamedQuery("Customer.findAll").getResultList();

  }
}

java.lang.RuntimeException: Unable to locate a single EntityManager. You 
must provide the persistence unit name as defined in the persistence.xml 
using the @PersistenceContext annotation.
	at 
org.apache.tapestry5.internal.jpa.JpaInternalUtils.getEntityManager(JpaInternalUtils.java:92)
	at 
org.apache.tapestry5.internal.jpa.EntityManagerObjectProvider$1.createObject(EntityManagerObjectProvider.java:62)


--
ae | Andreas Ernst | IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
a...@ae-online.de | www.ae-online.de
www.tachyon-online.de

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



JPA

2013-10-11 Thread Andreas Ernst

Hi,

i am playing with JPA, but there is no useful information about that. A 
simple example to display a database table.


The entities class is in the right package entities. I did not added 
something to the AppModule class. The persistence.xml exists.


Customer.tml

http://tapestry.apache.org/schema/tapestry_5_3.xsd";
  xmlns:p="tapestry:parameter">
  



Customers.class

public class Customers {

  @Property
  private Customer customer;
  private EntityManagerFactory factory;
  private EntityManager entityManager;
  @Inject
  private Logger logger;
  @Inject
  private BeanModelSource beanModelSource;
  @Inject
  private Messages messages;

  @Log
  public List getCustomers() {
factory = 
Persistence.createEntityManagerFactory("de.aeits_TapestryWeb_war_1.0-SNAPSHOTPU");

entityManager = factory.createEntityManager();
return 
entityManager.createNamedQuery("Customer.findAll").getResultList();

  }
}


What about the DAO and DAOImpl there are no informations how to use this 
classes with a simple query page.


In all docus i found only 
'entityManager.createNamedQuery("Customer.findAll").getResultList();' is 
needed, but i get a null pointer expection.


Thanks
Andreas
--
ae | Andreas Ernst | IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
a...@ae-online.de | www.ae-online.de
www.tachyon-online.de

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Method de.aeits.tapestryweb.pages.Index.onActionFromStart() references component id 'Start' which does not exist.

2013-10-08 Thread Andreas Ernst

Am 08.10.13 15:19, schrieb Eugen:

Hi,
post Your Index.tml file,
do You have something like

   start guessing

in Your page?


Thanks, i just saw, that this might be missing.

--
ae | Andreas Ernst | IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
a...@ae-online.de | www.ae-online.de
www.tachyon-online.de

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Method de.aeits.tapestryweb.pages.Index.onActionFromStart() references component id 'Start' which does not exist.

2013-10-08 Thread Andreas Ernst

Hi,

i just start with Tapestry:

http://tapestry.apache.org/implementing-the-hi-lo-guessing-game.html


package de.aeits.tapestryweb.pages;

import java.util.Date;
import org.apache.tapestry5.annotations.*;
import org.apache.tapestry5.ioc.annotations.*;
import org.apache.tapestry5.corelib.components.*;
import org.apache.tapestry5.SymbolConstants;
import org.apache.tapestry5.alerts.AlertManager;

/**
 * Start page of application TapestryWeb.
 */
public class Index {

  [...]

  void onActionFromStart() {
  }
}

After adding the method onActionFromStart() i got this error:

An unexpected application exception has occurred.

Method de.aeits.tapestryweb.pages.Index.onActionFromStart() references 
component id 'Start' which does not exist.


--
ae | Andreas Ernst | IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
a...@ae-online.de | www.ae-online.de
www.tachyon-online.de

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org