Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
NullPointerException when using Mapper
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Javier Domingo  
View profile  
 More options Apr 23 2012, 7:00 am
From: Javier Domingo <javier...@gmail.com>
Date: Mon, 23 Apr 2012 13:00:25 +0200
Local: Mon, Apr 23 2012 7:00 am
Subject: NullPointerException when using Mapper

Hi,

I have been doing a webapp (a CRUD interface for a db) and I am using as
guideline the jpetstore, with the exception that:

   1. I am also using the mybatis-generator's code.
   2. Services. I don't want to have services as a separate part. I want to
   use the Mappers directly on the Action bean
   3. I have all mappers.xml, mappers.java, example.java and entities.java
   (all the generator's code) in one folder (org.lmb97.data)

And I am encountering a NullPointerException when I try to use a mapper. I
checked all I could, but still not getting to the solution. I don't know
which is the problem. Everything has been said... but no idea. I think it
is something with the configuration. I have checked various bugs in the bug
tracker that seemed to be related but none was.

I am attaching apache tomcat's log and the normal log. log4j is configured
in ALL. And the repo is here[1], I am putting the exact commit, so that if
I work with the repo, you can see the actual state.

The netbeans project is configured so that if you clone it, you have all
libraries included with it, with no external dependencies.

I will be waiting for your reply, and don't hesitate mailing me to ask for
more data,

Sincerely,

Javier Domingo

[1]:
https://github.com/txomon/Universidad/tree/eb7753e32a2eccbf4e5e81e815...

  mybatis-mail.7z
30K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Javier Domingo  
View profile  
 More options Apr 22 2012, 7:37 pm
From: Javier Domingo <javier...@gmail.com>
Date: Mon, 23 Apr 2012 01:37:12 +0200
Local: Sun, Apr 22 2012 7:37 pm
Subject: NullPointerException when using Mapper

Hi,

I have been doing a webapp (a CRUD interface for a db) and I am using as
guideline the jpetstore, with the exception that:

   1. I am also using the mybatis-generator's code.
   2. Services. I don't want to have services as a separate part. I want to
   use the Mappers directly on the Action bean
   3. I have all mappers.xml, mappers.java, example.java and entities.java
   (all the generator's code) in one folder (org.lmb97.data)

And I am encountering a NullPointerException when I try to use a mapper. I
checked all I could, but still not getting to the solution. I don't know
which is the problem. Everything has been said... but no idea. I think it
is something with the configuration. I have checked various bugs in the bug
tracker that seemed to be related but none was.

I am attaching apache tomcat's log and the normal log. log4j is configured
in ALL. And the repo is here[1], I am putting the exact commit, so that if
I work with the repo, you can see the actual state.

The netbeans project is configured so that if you clone it, you have all
libraries included with it, with no external dependencies.

I will be waiting for your reply, and don't hesitate mailing me to ask for
more data,

Sincerely,

Javier Domingo

[1]:
https://github.com/txomon/Universidad/tree/eb7753e32a2eccbf4e5e81e815...

  mybatis-mail.7z
30K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Eduardo Macarron  
View profile  
 More options Apr 23 2012, 11:45 am
From: Eduardo Macarron <eduardo.macar...@gmail.com>
Date: Mon, 23 Apr 2012 17:45:01 +0200
Local: Mon, Apr 23 2012 11:45 am
Subject: Re: NullPointerException when using Mapper
Hola Javier,

basePackage property is a package name, so this:
<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
        <property name="basePackage" value="org.lmb97.data.*Mapper" />
 </bean>

should be:
 <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
        <property name="basePackage" value="org.lmb97.data" />
 </bean>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Javier Domingo  
View profile  
 More options Apr 23 2012, 5:50 pm
From: Javier Domingo <javier...@gmail.com>
Date: Mon, 23 Apr 2012 23:50:18 +0200
Local: Mon, Apr 23 2012 5:50 pm
Subject: Re: NullPointerException when using Mapper

Hola, gracias!

Yes that was a problem, but the one that was giving problems was that
@Autowire is used in Spring managed ones, for Stripes ones, I have to use
@SpringBean. Doing both solved the problems.

The related StackOverflow question is this:

http://stackoverflow.com/questions/10280004/nullpointerexception-usin...

I didn't have any real mybatis problems still :D

Cheers
El 23/04/2012 17:45, "Eduardo Macarron" <eduardo.macar...@gmail.com>
escribió:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »