Giter VIP home page Giter VIP logo

slim3's People

Contributors

bufferings avatar higayasuo avatar kissrobber avatar oyama1102 avatar sue445 avatar tomotaro1065 avatar

Watchers

 avatar

slim3's Issues

The missing setup step for [Enable Annoation Processing]

Please refer to the step 5 of
http://sites.google.com/site/slim3appengine/slim3-datastore/installation

There should be a screenshot of [Enable Annoation Processing] (in the
Annotation Processing directory) checkbox which should be checked.

In addition, [Generated source directory] should be set to 'src'.

Original issue reported on code.google.com by [email protected] on 19 May 2010 at 1:50

Attachments:

Test .class files are written in wrong directory

slim3 version: 1.0.4

In slim3-1.0.4, SomeXXXTest.class files are written in wrong directory.

Actual: "war/WEB-INF/classes"
Expected: "build/test-classes"


I think this behavior has been produced by the build path setting.

slim3-1.0.3: <classpathentry kind="src" output="build/test-classes" 
path="test"/>
slim3-1.0.4: <classpathentry kind="src" path="test"/>


Original issue reported on code.google.com by pekeq.9 on 19 May 2010 at 9:55

In-memory filter for ModelRef property causes IllegalStateException

The following in-memory filter for ModelRef property causes
IllegalStateException.

Bbb bbb = new Bbb();
bbb.getHogeRef().setModel(new Hoge());
Datastore.put(bbb);
BbbMeta m = BbbMeta.get();
Datastore.query(Bbb.class)
    .filterInMemory(m.hogeRef.equal(Datastore.createKey("Hoge", 1)))
    .sortInMemory(m.hogeRef.asc).asList();

java.lang.IllegalStateException: The property(hogeRef) of
model(org.slim3.datastore.model.Bbb) is not comparable.
    at
org.slim3.datastore.AbstractCriterion.compareValue(AbstractCriterion.java:77)
    at org.slim3.datastore.EqualCriterion.accept(EqualCriterion.java:65)
    at org.slim3.datastore.DatastoreUtil.accept(DatastoreUtil.java:1158)
    at org.slim3.datastore.DatastoreUtil.filterInMemory(DatastoreUtil.java:1145)
    at org.slim3.datastore.ModelQuery.asList(ModelQuery.java:333)
    at org.slim3.datastore.SpikeTest.spike(SpikeTest.java:41)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)
    at java.lang.reflect.Method.invoke(Method.java:592)
    at
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java
:44)
    at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:
15)
    at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:4
1)
    at
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20
)
    at
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
    at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76
)
    at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50
)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
    at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReferen
ce.java:46)
    at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner
.java:467)
    at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner
.java:683)
    at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java
:390)
    at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.jav
a:197)


Original issue reported on code.google.com by [email protected] on 20 Mar 2010 at 9:20

ClassCastException using with BlazeDS messaging amf

First of all, thank you for making slim3, this is a great framework for GAE. 
Having said that, I'm having some troubles to work it out with flex especially 
when hot-reloading is on. I hope this will be supported in the future releases.

What steps will reproduce the problem?
1. Used BlazeDS along with Slim3
2. Access data from flex(flash) client to server through messagebroker/amf of 
BlazeDS
3. Set hotReloadingFilter in web.xml only in /admin/* path.

What is the expected output? What do you see instead?
Get rid of the class cast exception thrown.

What version of the product are you using? On what operating system?
slim3 v1.0.5, Windows XP SP3, Eclipse Galileo, GAE 1.3.5

Please provide any additional information below.
Here's the error thrown in eclipse' console.

警告: /messagebroker/amf
java.lang.ClassCastException: org.slim3.controller.BytesHolder cannot be cast 
to flex.messaging.HttpFlexSession
    at flex.messaging.HttpFlexSession.getFlexSession(HttpFlexSession.java:230)
    at flex.messaging.MessageBrokerServlet.service(MessageBrokerServlet.java:257)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
    at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
    at org.slim3.datastore.DatastoreFilter.doFilter(DatastoreFilter.java:54)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    at com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java:51)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    at com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java:122)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
    at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
    at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
    at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
    at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
    at com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:70)
    at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    at com.google.appengine.tools.development.JettyContainerService$ApiProxyHandler.handle(JettyContainerService.java:349)
    at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    at org.mortbay.jetty.Server.handle(Server.java:326)
    at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
    at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:938)
    at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:755)
    at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
    at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
    at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
    at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)

Original issue reported on code.google.com by [email protected] on 22 Jul 2010 at 7:51

pluggable controller bean factory

    I have a tiny DI framework which is used to replace spring DI. I hope I can use it in slim3 controller but I don't know where to plug it in seamlessly without explicitly calling the getBean method of my tiny DI framework.

    If there is a controller bean factory which is configurable (declaratively or  programmatically), it would be much more easier to use custom DI framework.

Original issue reported on code.google.com by [email protected] on 12 Jun 2010 at 6:03

slim3-gen cause an error when using Polymorphic Model

1. create Foo model with byte[] parameter
----
@Model
public class Foo {
    @Attribute(primaryKey = true)
    private Key key;
    @Attribute(lob = true)
    private byte[] bytes;

    public Key getKey() {
        return key;
    }

    public void setKey(Key key) {
        this.key = key;
    }

    public byte[] getBytes() {
        return bytes;
    }

    public void setBytes(byte[] bytes) {
        this.bytes = bytes;
    }

}
----
2. create Bar model extends Foo
----
@Model
public class Bar extends Foo {
}

---
3. slim3-gen cause an error
[slim3GEN1025] The setter method[setBytes] is not found.


Original issue reported on code.google.com by shuji.w6e on 24 Aug 2010 at 1:25

Stop using MemcacheService#setNamespace()

Memcache causes NullPointerException.
The cause is MemcacheService.setNamespace(),
so Slim3 stops using MemcacheService.setNamespace().
Use NamespaceManager.setNamespace() instead of MemcacheService.setNamespace().

Original issue reported on code.google.com by [email protected] on 15 May 2010 at 8:07

Can not use package like xxx.model.yyy.model.ZzzModel

The partial stack trace is below:

java.lang.IllegalArgumentException: The meta data of the 
model(xxx.model.yyy.model.ZzzModel) is not found.
    at org.slim3.datastore.DatastoreUtil.createModelMeta(DatastoreUtil.java:1468)
    at org.slim3.datastore.DatastoreUtil.getModelMeta(DatastoreUtil.java:1395)
    at org.slim3.datastore.Datastore.getModelMeta(Datastore.java:2699)
    at org.slim3.datastore.Datastore.allocateId(Datastore.java:155)

The corresponding source code is:

            String metaClassName =
                modelClass.getName().replace(".model.", ".meta.").replace(
                    ".shared.",
                    ".server.")
                    + "Meta";

The sematics of the line is the first occurrence of ".model." will be replaced 
by ".meta.". But the slim3gen convention is the LAST occurrence of ".model." is 
replaced. So there is a inconsistency between the codegen tools and runtime 
library.

Original issue reported on code.google.com by [email protected] on 18 Jun 2010 at 10:00

Error when trying to get a Model from a List

What steps will reproduce the problem?
1.Create 1 or 2 entities and save them to datastore
2.Get all the entities saved in the datastore and start to use each entity 
retrieved
3.The error Exception in thread "main" java.lang.ClassCastException: 
com.zippio.model.MobileService cannot be cast to com.zippio.model.MobileService

What is the expected output? What do you see instead?
I expect to get an Entity, but I get the exepction where cannot cast to the 
same class

What version of the product are you using? On what operating system?
Slim3-1.3.5
Ubuntu 10
Eclipse Helios

Please provide any additional information below.

Original issue reported on code.google.com by [email protected] on 23 Sep 2010 at 1:00

modifty timestamp annotation

   If Slim3 add a new modify timestamp annotation, it would be more easy to
incremental backup data which is modified since last backup timestamp.
Although it could be done by programmers to maintain such a property when
writing every entity, it would reduce the burden of programmers.

Original issue reported on code.google.com by [email protected] on 2 May 2010 at 11:11

GWT + Model Meta data issue

Hello Higayasuo-san,

I am not sure how to spell your name in Kanji so forgive me :)

We are evaluating Slim3 with one of our GWT internal project. We are really
impressed with your work.

We are very much interested with model classes of Slim3 specially with
Query model. JDOQL is quite a bit of work compare to JPQL so we are
thinking of SLIM3.

The main issues we face while Slim3 integration with GWT is GWT compiler.
As you know GWT expects source files during compile so initially we were
unable to compile models because SLIM3 uses some of the app engine data
store APIs in entity model. 

However, we were able to create dummy classes and inherit them into GWT
module through super source feature of GWT. Today i had noticed that you
are also doing the same in gwtdemo in svn trunk. It should have saved lot
of time for me,if you had put that gwt link on homepage :).

The issues is GWT expects source files for Slim3 Meta classes as well, It
is quite a big task for us to create dummy classes for every Meta class.
otherwise, GWT don't compile model/entity classes.Because of this drawback
we are in a position to go ahead with Slim3. We will face issues when
entity model evolves into big.

Do you have any suggestions for the above issue. 

You haven't released app engine dummy classes (Key,Entity,Query etc)in
official slim3 release, Any specific reason for this.

Any plan for official SLIM3 version for GWT.

Your response is very much appreciated.

Note:If this message is not clear, i will try to write with my limited
Japanese.


Original issue reported on code.google.com by [email protected] on 19 Jan 2010 at 8:54

Model can not have field of type com.google.appengine.api.datastore.Key

    According to the document (
http://sites.google.com/site/slim3appengine/slim3-datastore/defining-data-classe
s/core-value-types
),the com.google.appengine.api.datastore.Key can be used as field type.
But a model (see the SomeModel example below) contains a Key field throws
the IllegalArgumentException exception when Datastore.put is called to
persist the entity of that class.

@Model(schemaVersion = 1)
public class SomeModel {

    @Attribute(primaryKey = true)
    private Key key;
    ...
    private Key someOtherKey;
    ...
}

Stack trace

java.lang.IllegalArgumentException: The meta data of the
model(com.google.appengine.api.datastore.Key) is not found.
    at org.slim3.datastore.DatastoreUtil.createModelMeta(DatastoreUtil.java:1295)
    at org.slim3.datastore.DatastoreUtil.getModelMeta(DatastoreUtil.java:1222)
    at org.slim3.datastore.DatastoreUtil.modelToEntity(DatastoreUtil.java:1398)
    at org.slim3.datastore.DatastoreUtil.modelsToEntities(DatastoreUtil.java:1426)
    at org.slim3.datastore.Datastore.put(Datastore.java:2324)
...
[omitted]

Original issue reported on code.google.com by [email protected] on 6 Apr 2010 at 9:43

IN Query does not work on production server

IN Query does not work on production server.

Entity entity = new Entity("Hoge");
entity.setProperty("aaa", "aaa");
Datastore.put(entity);
System.out.println(
    Datastore.query("Hoge")
    .filter("aaa",FilterOperator.IN,Arrays.asList("aaa", "bbbb"))
    .count());

Original issue reported on code.google.com by [email protected] on 23 Jun 2010 at 4:52

Validation without ResourceBundle

I want to ensure never using ResourceBundle.
(Specifing a message directly is an unsafe-way...)
That's mean I think new api as follows:


public final class ApplicationMessage {
   private static ThreadLocal<NonRB> nonRB=
       new ThreadLocal<NonRB>();

  ...........

  public static String get(String key, Object... args)
           throws MissingResourceException {
       if(nonRB.get() != null ){
          return nonRB.get().get(key,args);
       }
       ResourceBundle bundle = bundles.get();
       ....
  }
}

public interface NonRB{
  String get(String key, Object... args);
}


If you append new API (like this), I will be very happy. ;-)

Original issue reported on code.google.com by [email protected] on 19 Apr 2010 at 10:05

The issue with negative value of Key

What steps will reproduce the problem?
Datastore.put(new Entity(Datastore.createKey("Hoge", -1)));

What is the expected output? What do you see instead?
No exception is thrown.

Original issue reported on code.google.com by [email protected] on 13 Apr 2010 at 6:23

ModelQuery doesn't obtain entity property values

What steps will reproduce the problem?
1. Run keyFieldInvalidValueTest() JUnit4 test.
   It reaches to the last Assert.fail() statement since chapterQuery.asList() does not fetch the properties' values of the Chapter entity.
2. In keyFieldInvalidValueTest, comment out the following statements:
 ModelQuery<Chapter> chapterQuery = Datastore.query( Chapter.class);
 Assert.assertEquals( 4, chapterQuery.count());
 for( Chapter storedChapter : chapterQuery.asList()) {
3. In keyFieldInvalidValueTest, change the following statements from as 
comments to as statement:
// List<Chapter> chapters = Datastore.query( Chapter.class).asList();
// Assert.assertEquals( 4, chapters.size());
// for( Chapter storedChapter : chapters) {
4. Run keyFieldInvalidValueTest test again. This time, it will pass.

What is the expected output? What do you see instead?
not-inline statement of asList method of ModelQuery object would obtain entity 
property value.

What version of the product are you using? On what operating system?
slim3-1.0.5.jar
AppEngine ver 1.3.6 (Not production environment; test environment by 
LocalServiceTestHelper. Haven't tried on production environment.)
Eclipse Galileo Build id: 20100218-1602 on English Windows XP Sp3

Please provide any additional information below.

Original issue reported on code.google.com by [email protected] on 24 Aug 2010 at 6:56

Attachments:

hashCode and equals method implementation to ModelRef class

Could you implement hashCode and equals method implementation to the ModelRef 
class of Slim3 datastore package?

Without those in the ModelRef class, the hashCode and equals methods 
auto-generated in the POJO domain object (in relation with other domain object) 
are not enough to implement simple comparison of the POJO domain objects, and 
it is necessary to add a little codes manually. 

As an example, the following unit test will fail:
    encodedKey = KeyFactory.keyToString( c1.getKey());
    Assert.assertEquals( c1, Datastore.get( Chapter.class, KeyFactory.stringToKey( encodedKey)));

    Here, c1 is a entity of the simple POJO domain class with reference to Book class entity:
        @Model
        public class Chapter {
            @Attribute( primaryKey = true)
            protected Key key;
            protected String title;
            protected int numPages;
            protected ModelRef<Book> bookRef = new ModelRef<Book>( Book.class);

            ... getters and setters ...
        }

    Assert failes as those are referring different object.
    So, to solve it, adding equals and hashCode methods to Chapter class by letting Eclipse auto-generate those methods. At this step, Eclipse alerts that those methods will not work as expected because ModelRef does not have equals and hashCode methods.
    And as expected, without modifying the auto-generated methods manually, assertEquals statement will fail again.

Instead of modifing the auto-generated hashCode and equals methods manually in 
Chapter class, I made the BookModelRef class extending ModelRef class. It has 
only the hashCode and equals methods which are same boiler-plate pattern 
Eclipse generates for the model and key fields.
    public class BookModelRef extends ModelRef<Book> {
        public BookModelRef() {
            super( Book.class);
        }

        @Override
        public int hashCode() {
            final int prime = 31;
            int result = 1;
            result = prime * result + ((super.model == null) ? 0 : super.model.hashCode());
            result = prime * result + ((super.key == null) ? 0 : super.key.hashCode());
            return result;
        }

        @Override
        public boolean equals( Object obj) {
            if (this == obj) return true;
            if (obj == null) return false;
            if ( getClass() != obj.getClass()) return false;

            ModelRef other = (ModelRef) obj;

            if ( getModel() == null) {
                if ( other.getModel() != null) return false;
            } else if (!getModel().equals( other.getModel())) return false;

            if ( getKey() == null) {
                if ( other.getKey() != null) return false;
            } else if (!getKey().equals( other.getKey())) return false;

            return true;
        }
    }

And when I change the ModelRef<Book> field to the BookModelRef type in the 
Chapter class, the assertEquals statement will pass.

As the conclusion, if ModelRef class has the hashCode and equals methods like 
below, implementing comparison of simple POJO domain objects becomes just 
matter of letting Eclipse auto-generate those, less manual hussle. 

Warm regards

Original issue reported on code.google.com by [email protected] on 17 Sep 2010 at 3:12

Transaction sometimes does not work

What steps will reproduce the problem?

The following code sometimes fails.

Entity entity = new Entity("Test", "k");
Datastore.put(entity);

Transaction tx = Datastore.beginTransaction();
entity.setProperty("p", 0);
Datastore.put(tx, entity);
Datastore.rollback(tx);

if (Datastore.get(entity.getKey()).getProperty("p") != null) {
    throw new IllegalStateException();
}

The cause is DatastoreUtil#createPutRequest().
DatastoreUtil#createPutRequest() assumes that transaction handle is
positive. But in fact, there are the cases transaction handle is negative.

Original issue reported on code.google.com by [email protected] on 28 Apr 2010 at 1:40

Slim3 Eclipse Plugin

As Google Plugin for Eclipse offers, if there is a plugin with a button to 
create new slim3 project, Ease of development by slim3 would be enhanced more.
When the button pushed, there can be a dialogue box with some check boxes such 
as following;
1. Use gwt or not.
2. Use slim3 datastore or not.
3. Use global transaction or not.
3. Use slim3 controller or not.
4. some other option to create slim3 project.
...

Then a developer could specify project name, or some other things which needs 
to edit build.xml with out the plugin.
After specifying everything, developer push finish button, and all files can be 
generated automatically including web.xml and build.xml.
The plugin also can contain button to create new model class.
As Google Plugin for Eclipse, Slim3 plugin contain all latest slim3 library 
files and update notification can popup when latest version of Slim3 uploaded 
on 
update site.


Original issue reported on code.google.com by [email protected] on 26 Mar 2010 at 5:14

isXXX field which has both getter and setter causes an error

What steps will reproduce the problem?
1. create "isoCode" field
2. create setIsoCode/getIsoCode. 
3. An error occurs. [SLIM3GEN1012] The setter method[setIsCode] is not found.

What version of the product are you using? On what operating system?
slim3-1.0.1.jar
slim3-gen-1.0.1.jar

Original issue reported on code.google.com by [email protected] on 8 Apr 2010 at 1:04

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.